/asr-client-scripts

Scripts to use AISpeechlab ASR

Primary LanguagePython

asr-client-scripts

1. To use demo engines

  • Try demo for free on webUI without programming/scripting at AISingapore

2. To use AISpeechlab engine with livestreaming mode

  • Dependencies

    * ws4py
    * urllib
    * pyaudio
    
  • Commands

    $ python3 client_3.py -o file -u "wss://gateway.speechlab.sg/client/ws/speech" -t "YOUR_TOKEN" -m "eng_closetalk" audio/audio.wav
    $ python2 client_2.py -u "wss://gateway.speechlab.sg/client/ws/speech" -t "YOUR_TOKEN" -m "eng_closetalk" audio/audio.wav
    
  • Options

    * -o file|stream: If you want to input your voice from microphones, please use '-o stream' option, instead of '-o file'. Default is 'file'
    * -m <model>: The model best fit to your audio content, for examples: eng_closetalk, eng_telephony, etc.
    
  • If you want to specify the content-type for your audio:

    $ python3 client_3.py -u "wss://gateway.speechlab.sg/client/ws/speech?content-type=audio/x-raw,+layout=(string)interleaved,+rate=(int)8000,+format=(string)S16LE,+channels=(int)1" -t "YOUR_TOKEN" -m "eng_closetalk" audio/audio.wav
    

3. To use AISpeechlab engine with batch mode

  • Dependencies

    * python3
    * ffmpeg
    
  • Command (with example audios in audio/)

    $ python3 batch/asr_transcribe_batch.py audio/audio.wav
    
  • Further usage, please check here.

Contact us

Visit us at this link