Tuesday, 14 March 2017

Streaming audio from Python to Watson Speech-to-Text via Express

I have a Raspberry Pi with a USB microphone, and am trying to, in order:

  1. stream the audio input from the microphone to a NodeJS (express) API,
  2. have the API pass the audio stream on to the Watson Speech-to-Text API,
  3. store the response in a MongoDB.

I know some basic Python and have set up a NodeJS server with a few basic express routes. I am able to record audio files and send them to the API, but can't for the life of me figure out how to stream audio from the microphone to the Watson Speech-to-text API while passing through the Express API, be it through WebSockets, sessions or any other way.

Any pointers would be more than welcome.

Thanks!



via Joris

No comments:

Post a Comment