Dream to Learn is shutting down...

We are very sorry to say that Dream to Learn will be shutting down as of December 28th, 2019. If you have content that you wish to keep, you should make a copy of it before that date.


Speech to Text - (STT) - Leaning on Python for Audio

POSTED IN: Building Bridges from R to IBM Watson

Python as a Tool to help with Continuous Audio

I've not figured out how to do audio better in R (than chunking it in samples, and WAV and then sending WAV file up) - which leads to some dead time while we wait for API to get back to us. (Single threaded)

I figure it's time to develop another tool.  R can call Python from inside code - so wanted to see about Audio.  For now - the hello world moment is getting

"This project consists of a python client that interacts with the IBM Watson Speech To Text service through its WebSockets interface. The client streams audio to the STT service and receives recognition hypotheses in real time. It can run N simultaneous recognition sessions"

Original code for WAV files


Jake's modified code for streaming (thanks Jake)


Video of Demo



Interested in more content by this author?

About the Author

Ryan Anderson

Ryan Anderson

Hi! I like to play with data, analytics and hack around with robots and gadgets in my garage. Lately I've been learning about machine learning.

About this blog

This is an informal blog that explores tools, code and tricks that group members have developed to engage IBM Watson cognitive computing services - from the R Programming Language. Packages include RCURL to access Watson APIs - for services that include Natural Language Classifier and Speech to Text. THIS IS MY PERSONAL BLOG - it does not represent the views of my employer. Code is presented as 'use at your own risk' (it has lots of bugs)

Created: September 13, 2015


Up Next