speechmatics-python icon indicating copy to clipboard operation
speechmatics-python copied to clipboard

Add support/example for microphone or stream input for Realtime STT in python-sdk/websocket

Open Baavro opened this issue 1 year ago • 2 comments

There is no support/documentation provided for Microphone or Data Stream right now for input when using Transcribe in Real-Time

Implement an example websockets in any language with mic or stream support

Baavro avatar Apr 13 '24 10:04 Baavro

Hi @Baavro. I added a Python example recently here: https://github.com/speechmatics/speechmatics-python/blob/master/examples/transcribe_from_microphone.py. This shows how to transcribe live from your local microphone in real-time.

You need to pip install sounddevice (https://pypi.org/project/sounddevice/) and select the device_id you want to use by running

python3 -m sounddevice

this can then be passed to python3 examples/transcribe_from_microphone.py -d $DEVICE -a $SPEECHMATICS_AUTH_TOKEN -l en.

Is this helpful?

HennerM avatar Apr 13 '24 11:04 HennerM

how can be grabbed the text chunks and final sentence from this code sir?

M-C-Dev avatar Aug 04 '24 20:08 M-C-Dev