speechmatics / speechmatics-python

Python library and CLI for Speechmatics
https://speechmatics.github.io/speechmatics-python/
MIT License
58 stars 14 forks source link

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

Open Baavro opened 5 months ago

Baavro commented 5 months ago

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

HennerM commented 5 months ago

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?

M-C-Dev commented 1 month ago

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