Dictation Made Easy

Jon FordDeveloper Leave a Comment

Automatic speech recognition (ASR) challenges the best IT and development teams. Software installation and updates, speaker profile management, and security concerns (HIPAA, PIPEDA, etc.) drive complexity and cost that most technical professionals would prefer to avoid.

nVoq’s speaker independent dictation service makes dictation easy, fast, and secure. There is no profile training, no software installation, and no additional security to manage. You simply:

  1. Sign up and select a specialty (radiology, orthopedics, legal, etc.)
  2. Run the SayIt web application – no installation
  3. Start dictating and see the text stream back in real-time

Yep, it’s that easy.

About the Author

Jon Ford

VP Engineering

But, what if you want to integrate speech with your application? In my last blog post, I claimed our HTTP API was easy too. Now I will prove it. Transcribing audio requires:

  1. Upload the audio
  2. Create a dictation
  3. Get the resulting text

Easy. A full example is shown below – bash style. Give us a call and we’ll set you up with your development account.

Now, go code this up in your favorite language and give your users the speech functionality they have been asking for.

Code Sample

#!/bin/bash
#Set your connection parameters
user=sponge.bob
password=myF4v0r1t3Pa55w0rd
serverInfo=https://eval.nvoq.com:443

#helper function
collect_location()
{
sed -n -e ‘s/^.*Location: //p’ | tr -d ‘ /r’
}
#########################################
#1. Upload audio
#########################################
audioLocation=$(curl -v -X POST -u ${user}:${password} –header “Content-Type:audio/x-wav” –data-binary “@myAudioFile.wav” ${serverInfo}/SCFileserver/audio 2>&1 | collect_location)

#########################################
#2. Create dictation
#########################################
dictationLocation=$(curl -v -X POST -u ${user}:${password} -d “streaming=false&profile=${user}&jobDelayInMillis=100&audio-url=${audioLocation}&audio-format=pcm-16khz&priority=42&audio-url-complete=true&client-observer-id=${RANDOM}” ${serverInfo}/SCDictation/rest/sayit/factory/dictations/ 2>&1 | collect_location)

#########################################
#3. Check completion and get results
#########################################
completed=”false”
while [ ${completed} == “false” ]; do
completed=$(curl -s -u ${user}:${password} ${dictationLocation}/done)
echo “checking for completion…”
sleep 2
done
echo “—”
echo “Dictation done. Results:”
curl -u ${user}:${password} ${dictationLocation}/text

To stream audio and receive the results in real-time, see our HTTP API here: http://support.nvoq.com/api.

Leave a Reply