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.
Run pip install watson_streaming.
Download the credentials.json file from IBM Watson and put it in your current working directory.
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 as 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.1.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for watson_streaming-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec9bdb59038293e370c0c8cd42d48f46b9af5d0b103b83026adaeecf79a59c94 |
|
MD5 | d6b258d8b75940da790da989010b6bbc |
|
BLAKE2b-256 | cad282e695e8011ace938112f43d3e55f175de80a244944938cf667a406b4892 |