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.
Prepare your credentials:
Visit the IBM Watson projects page.
Choose your project.
Copy the credentials to credentials.json somewhere on your computer.
pip install watson-streaming and you are ready to go!
Using from the command line
watson-streaming path/to/credentials.json # And start talking
Using as a library
from watson_streaming import transcribe
# Write whatever you want in your callback function (expecting a dict)
def example_callback(data):
if 'results' in data:
transcript = data['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.4.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for watson_streaming-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a06bf6e5d3b9e03b8f3dcf3c2ced4fcaff27dd2714163276babdc9e2678526dc |
|
MD5 | eed664159e0dea4920c189bf17c4e2b8 |
|
BLAKE2b-256 | 46819afcaa8547bea7210f984f19959e802dd05eb8568ba38766e7b512262edb |