KishaanG commited on
Commit
1f868e0
·
verified ·
1 Parent(s): c06c75b

Upload audact-stage_b_aug2

Browse files
README.md CHANGED
@@ -14,9 +14,9 @@ base_model:
14
  - Cactus-Compute/needle
15
  ---
16
 
17
- # voice-tool-call (draft)
18
 
19
- Speech plus a list of tools in, one tool call (or no call) out, with **no transcript in between**.
20
  About 52.6M parameters (211 MB in fp32). English, up to 10 tools per request, one call or none, arguments that are enums,
21
  numbers or short strings. Built to work on **tools it never saw in training**.
22
 
@@ -42,9 +42,9 @@ pip install -r requirements.txt # needs NeMo for FastConformer's architectur
42
  ```
43
 
44
  ```python
45
- from voice_tool_call import VoiceToolCaller
46
 
47
- caller = VoiceToolCaller.from_pretrained(".") # or the Hugging Face repo id
48
  tools = [{"name": "set_thermostat", "description": "Set the heating temperature.",
49
  "parameters": {"type": "object", "properties": {"degrees": {"type": "integer"}}, "required": ["degrees"]}}]
50
  print(caller("command.wav", tools)) # {"name": "set_thermostat", "arguments": {"degrees": 21}} or None
 
14
  - Cactus-Compute/needle
15
  ---
16
 
17
+ # Audact (draft)
18
 
19
+ **Audact** (audio + act): speak a command, get a tool call. Speech plus a list of tools in, one tool call (or no call) out, with **no transcript in between**.
20
  About 52.6M parameters (211 MB in fp32). English, up to 10 tools per request, one call or none, arguments that are enums,
21
  numbers or short strings. Built to work on **tools it never saw in training**.
22
 
 
42
  ```
43
 
44
  ```python
45
+ from audact import Audact
46
 
47
+ caller = Audact.from_pretrained(".") # a downloaded copy of KishaanG/audact
48
  tools = [{"name": "set_thermostat", "description": "Set the heating temperature.",
49
  "parameters": {"type": "object", "properties": {"degrees": {"type": "integer"}}, "required": ["degrees"]}}]
50
  print(caller("command.wav", tools)) # {"name": "set_thermostat", "arguments": {"degrees": 21}} or None
audact/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from .caller import Audact
2
+
3
+ __all__ = ["Audact"]
{voice_tool_call → audact}/audio_encoder.py RENAMED
File without changes
{voice_tool_call → audact}/caller.py RENAMED
@@ -1,4 +1,4 @@
1
- """VoiceToolCaller: speech + a tool list in, one tool call (or none) out. No transcript in between."""
2
  from __future__ import annotations
3
 
4
  import json
@@ -14,12 +14,12 @@ from .voice_model import VoiceToolModel
14
  RATE = 16_000
15
 
16
 
17
- class VoiceToolCaller:
18
  def __init__(self, model: VoiceToolModel, sp, device: str) -> None:
19
  self.model, self.sp, self.device = model.eval(), sp, device
20
 
21
  @classmethod
22
- def from_pretrained(cls, path_or_repo: str, device: str | None = None, revision: str | None = None) -> VoiceToolCaller:
23
  """A local folder or a Hugging Face repo id. Needs NeMo for the audio encoder's architecture
24
  (pip install "nemo_toolkit[asr]"); its base weights download once, then ours replace them."""
25
  import sentencepiece as spm
 
1
+ """Audact: speech + a tool list in, one tool call (or none) out. No transcript in between."""
2
  from __future__ import annotations
3
 
4
  import json
 
14
  RATE = 16_000
15
 
16
 
17
+ class Audact:
18
  def __init__(self, model: VoiceToolModel, sp, device: str) -> None:
19
  self.model, self.sp, self.device = model.eval(), sp, device
20
 
21
  @classmethod
22
+ def from_pretrained(cls, path_or_repo: str, device: str | None = None, revision: str | None = None) -> Audact:
23
  """A local folder or a Hugging Face repo id. Needs NeMo for the audio encoder's architecture
24
  (pip install "nemo_toolkit[asr]"); its base weights download once, then ours replace them."""
25
  import sentencepiece as spm
{voice_tool_call → audact}/decode.py RENAMED
File without changes
{voice_tool_call → audact}/needle.py RENAMED
File without changes
{voice_tool_call → audact}/voice_model.py RENAMED
File without changes
inference.py CHANGED
@@ -2,7 +2,7 @@
2
  import json
3
  import sys
4
 
5
- from voice_tool_call import VoiceToolCaller
6
 
7
- caller = VoiceToolCaller.from_pretrained(".")
8
  print(json.dumps(caller(sys.argv[1], json.load(open(sys.argv[2])))))
 
2
  import json
3
  import sys
4
 
5
+ from audact import Audact
6
 
7
+ caller = Audact.from_pretrained(".")
8
  print(json.dumps(caller(sys.argv[1], json.load(open(sys.argv[2])))))
voice_tool_call/__init__.py DELETED
@@ -1,3 +0,0 @@
1
- from .caller import VoiceToolCaller
2
-
3
- __all__ = ["VoiceToolCaller"]