Skip to content

streaming.py improvements #9

@brandon-gong

Description

@brandon-gong

Couple of fixes:

  • Maybe add debug levels. Right now bunches of scary alsa messages are getting output into console, and somewhere hidden in there is what the user actually says. A better user interface would be just to print what the user says while streaming transcription. But also be able to re-enable those messages for debug purposes.
  • Automatically catch ErrNo 9981: Input Overflowed errors. It seems like most of the kids except like one or two got this error, and we fixed all of the issues by simply changing the RATE from 48000 to 44100. How hard can it be to automatically catch the error and retry with a different RATE?
  • Don't have a hardcoded record time. Right now, streaming.py records for 3 seconds and then stops. So the kids would have to squeeze whatever they have to say into three seconds. streaming.py needs to be able to record until the kid is done talking. This may be harder, because it's streaming. I'll see. I can't simply take the code from speechRecorder.py because the way speechRecorder.py works is it stores all of the audio data in these massive deques and then writes the entire deque to a file once its done. Not very streaming-ish.
  • Figure out how to use custom names. Some of the kids had to change their robot's names to common words like "table" because streaming transcription did not support custom terms. Information about customization is found here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions