All Projects → speechmatics → speechmatics-python

speechmatics / speechmatics-python

Licence: MIT license
Python library and CLI for Speechmatics

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to speechmatics-python

leopard
On-device speech-to-text engine powered by deep learning
Stars: ✭ 354 (+1375%)
Mutual labels:  speech-recognition, speech-to-text, transcription
kaldi-long-audio-alignment
Long audio alignment using Kaldi
Stars: ✭ 21 (-12.5%)
Mutual labels:  speech-recognition, speech-to-text, transcription
React.ai
It recognize your speech and trained AI Bot will respond(i.e Customer Service, Personal Assistant) using Machine Learning API (DialogFlow, apiai), Speech Recognition, GraphQL, Next.js, React, redux
Stars: ✭ 38 (+58.33%)
Mutual labels:  speech-recognition, speech-to-text
Speechbrain.github.io
The SpeechBrain project aims to build a novel speech toolkit fully based on PyTorch. With SpeechBrain users can easily create speech processing systems, ranging from speech recognition (both HMM/DNN and end-to-end), speaker recognition, speech enhancement, speech separation, multi-microphone speech processing, and many others.
Stars: ✭ 242 (+908.33%)
Mutual labels:  speech-recognition, speech-to-text
anycontrol
Voice control for your websites and applications
Stars: ✭ 53 (+120.83%)
Mutual labels:  speech-recognition, speech-to-text
KeenASR-Android-PoC
A proof-of-concept app using KeenASR SDK on Android. WE ARE HIRING: https://keenresearch.com/careers.html
Stars: ✭ 21 (-12.5%)
Mutual labels:  speech-recognition, speech-to-text
simple-obs-stt
Speech-to-text and keyboard input captions for OBS.
Stars: ✭ 89 (+270.83%)
Mutual labels:  speech-recognition, speech-to-text
megs
A merged version of multiple open-source German speech datasets.
Stars: ✭ 21 (-12.5%)
Mutual labels:  speech-recognition, speech-to-text
Edgedict
Working online speech recognition based on RNN Transducer. ( Trained model release available in release )
Stars: ✭ 205 (+754.17%)
Mutual labels:  speech-recognition, speech-to-text
wav2vec2-live
A live speech recognition using Facebooks wav2vec 2.0 model.
Stars: ✭ 205 (+754.17%)
Mutual labels:  speech-recognition, speech-to-text
ASR-Audio-Data-Links
A list of publically available audio data that anyone can download for ASR or other speech activities
Stars: ✭ 179 (+645.83%)
Mutual labels:  speech-recognition, speech-to-text
revai-java-sdk
Rev.ai Java SDK
Stars: ✭ 16 (-33.33%)
Mutual labels:  speech-recognition, speech-to-text
Nemo
NeMo: a toolkit for conversational AI
Stars: ✭ 3,685 (+15254.17%)
Mutual labels:  speech-recognition, speech-to-text
react-native-spokestack
Spokestack: give your React Native app a voice interface!
Stars: ✭ 53 (+120.83%)
Mutual labels:  speech-recognition, speech-to-text
Rnn ctc
Recurrent Neural Network and Long Short Term Memory (LSTM) with Connectionist Temporal Classification implemented in Theano. Includes a Toy training example.
Stars: ✭ 220 (+816.67%)
Mutual labels:  speech-recognition, speech-to-text
Speech recognition with tensorflow
Implementation of a seq2seq model for Speech Recognition using the latest version of TensorFlow. Architecture similar to Listen, Attend and Spell.
Stars: ✭ 253 (+954.17%)
Mutual labels:  speech-recognition, speech-to-text
speech-recognition-evaluation
Evaluate results from ASR/Speech-to-Text quickly
Stars: ✭ 25 (+4.17%)
Mutual labels:  speech-recognition, speech-to-text
K6nele
An Android app that offers speech-to-text services and user interfaces to other apps
Stars: ✭ 196 (+716.67%)
Mutual labels:  speech-recognition, speech-to-text
Kaldi Active Grammar
Python Kaldi speech recognition with grammars that can be set active/inactive dynamically at decode-time
Stars: ✭ 196 (+716.67%)
Mutual labels:  speech-recognition, speech-to-text
revai-python-sdk
Rev AI Python SDK
Stars: ✭ 35 (+45.83%)
Mutual labels:  speech-recognition, speech-to-text

speechmatics-python   Tests codecov License

Python client library and CLI for Speechmatics Realtime and Batch ASR v2 APIs.

Getting started

To install from PyPI:

$ pip install speechmatics-python

To install from source:

$ git clone https://github.com/speechmatics/speechmatics-python
$ cd speechmatics-python && python setup.py install

Requirements

  • Python 3.7+

Example command-line usage

Realtime ASR

  • Starting a real-time session for SaaS customers using a .wav file as the input audio:

    # Point URL to the SaaS self-service runtime
    $ URL=wss://eu2.rt.speechmatics.com/v2/en
    
    $ speechmatics transcribe --url $URL --ssl-mode regular --auth-token $AUTH_TOKEN --generate-temp-token example_audio.wav
  • Starting a real-time session for enterprise SaaS customers using a .wav file as the input audio:

    $ speechmatics transcribe --url $URL --ssl-mode regular --auth-token $AUTH_TOKEN example_audio.wav
  • Starting a real-time session for on-prem customers using a .wav file as the input audio:

    # Point URL to the local instance of the realtime appliance
    $ URL=ws://realtimeappliance.yourcompany:9000/v2
    
    $ speechmatics transcribe --url $URL --lang en --ssl-mode none example_audio.wav
  • Show the messages that are going over the websocket connection:

    $ speechmatics -v transcribe --url $URL --lang en --ssl-mode none example_audio.wav
  • The CLI also accepts an audio stream on standard input. Transcribe the piped input audio:

    $ cat example_audio.wav | speechmatics transcribe --ssl-mode none --url $URL --lang en -
  • Pipe audio directly from the microphone (example uses MacOS with ffmpeg)

    List available input devices:

    $ ffmpeg -f avfoundation -list_devices true -i ""

    There needs to be at least one available microphone attached to your computer. The command below gets the microphone input and pipes it to the transcriber. You may need to change the sample rate to match the sample rate that your machine records at. You may also need to replace :default with something like :0 or :1 if you want to use a specific microphone.

    $ ffmpeg -loglevel quiet -f avfoundation -i ":default" -f f32le -acodec pcm_f32le -ar 44100 - \
    >   | speechmatics transcribe --ssl-mode none --url $URL --raw pcm_f32le --sample-rate 44100 --lang en -
  • Transcribe in real-time with partials (example uses Ubuntu with ALSA). In this mode, the transcription engine produces words instantly, which may get updated as additional context becomes available.

    List available input devices:

    $ cat /proc/asound/cards

    Record microphone audio and pipe to transcriber:

    $ ffmpeg -loglevel quiet -f alsa -i hw:0 -f f32le -acodec pcm_f32le -ar 44100 - \
        | speechmatics transcribe --ssl-mode none --url $URL --enable-partials --raw pcm_f32le --sample-rate 44100 --lang en -

    Add the --print-json argument to see the raw JSON transcript messages being sent rather than just the plaintext transcript.

    Batch ASR

  • Submit a .wav file for batch ASR processing

    # Point URL to Speechmatics SaaS (Batch Virtual Appliance is also supported)
    $ URL=https://asr.api.speechmatics.com/v2/
    $ AUTH_TOKEN='abcd01234'
    
    $ speechmatics batch transcribe --url $URL --auth-token $AUTH_TOKEN --lang en example_audio.wav
  • Files may be submitted for asynchronous processing

    $ speechmatics batch submit --url $URL --auth-token $AUTH_TOKEN --lang en example_audio.wav
  • Check processing status of a job

    # $JOB_ID is from the submit command output
    $ speechmatics batch job-status --url $URL --auth-token $AUTH_TOKEN --job-id $JOB_ID
  • Retrieve completed transcription

    # $JOB_ID is from the submit command output
    $ speechmatics batch get-results --url $URL --auth-token $AUTH_TOKEN --job-id $JOB_ID

    Custom Transcription Config File

  • Instead of passing all the transcription options via the command line you can also pass a transcription config file. The config file is a JSON file that contains the transcription options. The config file can be passed to the CLI using the --config-file option.

    $ speechmatics transcribe --config-file transcription_config.json example_audio.wav
  • The format of this JSON file is described in detail in the Batch API documentation and RT API documentation.

API documentation

Please see https://speechmatics.github.io/speechmatics-python/.

Testing

To install development dependencies and run tests

$ pip install -r requirements-dev.txt
$ make test

Support

If you have any issues with this library or encounter any bugs then please get in touch with us at [email protected].


License: MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].