Speech to text transcription in real-time using IBM Watson
Project description
Speech to text transcription from your microphone in real-time using IBM Watson.
Installing
This project depends on PortAudio - a free, cross-platform, open-source, audio I/O library. Install it first.
Download the credentials.json file from IBM Watson and put it in your current working directory.
pip install watson-streaming and you are ready to go!
Using from the command line
watson-streaming # And start talking
Using as a library
from watson_streaming import transcribe
# Write whatever you want in your callback function
def example_callback(msg):
msg = json.loads(msg)
if 'results' in msg:
transcript = msg['results'][0]['alternatives'][0]['transcript']
print(transcript)
# Provide a dictionary of Watson input and output features.
# For example
settings = {
'inactivity_timeout': -1, # Don't kill me after 30 seconds
'interim_results': True,
}
# You can't ask for a simpler API than this!
transcribe(example_callback, settings, 'credentials.json')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
watson-streaming-0.0.2.tar.gz
(4.3 kB
view hashes)
Built Distributions
Close
Hashes for watson_streaming-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cde42370130a658728b94e418fa792e810c21978bab2e56cace5280ab4385d33 |
|
MD5 | bf38f869c731d8f335a2612e82b3c6b4 |
|
BLAKE2b-256 | cc30c8f6a58db4c4c034904f77006a3aeecb64c648612592690f278bf820d1c0 |
Close
Hashes for watson_streaming-0.0.2-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | abbc3da6ab3a61135bd1857d53b689dbd4f18a4ac28381a126e6c5325ae2a063 |
|
MD5 | badc2f6c603964874f2fc0633078a409 |
|
BLAKE2b-256 | eba51bb7be76c3960beadc6709a7aac8cc73e94ad23c85d713524ddcb916e055 |