Skip to content

Commit 7d771b5

Browse files
committed
add documentation and remove unneccesary comments
1 parent 2dbeb0f commit 7d771b5

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

examples/speech_to_text/readme.md

+14
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,17 @@ WER LAAL AL AP DAL ATD
6262
```
6363

6464
This agent can also perform S2T task, by adding `--task translate`.
65+
66+
### Streaming Speech-to-Text Demo
67+
68+
A streaming speech to text demo feature, taking input from user's microphone, sending it to Whisper's wait-k model, and displaying the prediction texts in the terminal.
69+
70+
1. Kick off a remote agent. More information [Remote_agent](../../docs/tutorials/remote_evaluation.rst)
71+
2. Enter demo mode by providing a desired segment size (usually 500ms):
72+
73+
```bash
74+
simuleval --remote-eval --demo --source-segment-size 500 --remote-port 8888
75+
```
76+
77+
3. Speak into the microphone and watch the live transcription!
78+
4. Press ^c (Control C) to exit the program in terminal

examples/speech_to_text/whisper_waitk.py

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def add_args(parser):
4848
)
4949

5050
def policy(self, states: Optional[AgentStates] = None):
51-
print(states)
5251
if states is None:
5352
states = self.states
5453

simuleval/evaluator/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def remote_eval(self):
148148
else:
149149
segment = SpeechSegment(
150150
index=self.source_segment_size,
151-
content=[0.0, 0.0],
151+
content=[0.0 for _ in range(8192)],
152152
sample_rate=self.sample_rate,
153153
finished=True,
154154
)

0 commit comments

Comments
 (0)