VoxImplant. Blog

High quality Speech Recognition is now available

RecognitionHi everyone! We’ve been busy working on new cool features for you, many developers asked us about high quality speech recognition for both audio call records transcription and real-time recognition scenarios. We are happy to announce that this functionality is now available for all our developers.

Key benefits to developers:

  • Call recording transcription. Voximplant developers can produce high-fidelity transcripts of their calls.
  • Real-time voice recognition for smart interactive voice response (IVR) scenarios. Customers can now make use of IVR systems offering computerized voice interactions through the Voximplant platform.
  • Rapid speech recognition and processing. Fast recognition reduces delays between when a person stops speaking and when the software receives the speech as text in order to act upon it.
  • Superior end-of-speech detection. Accurate end-of-speech detection enables more effective parsing of conversations for both transcription and software processing purpose.
  • Robust language support. More than 80 languages are now supported.

We use Google Speech API to bring this new functionality and we’re eager to see new exciting communication applications and scenarios Voximplant developers will create using it. You can find the examples below.

How to use

Use the following code if you want to make a call record that should be transcribed into text:

  1. require(Modules.ASR);
  2. // Record two-way audio (stereo is optional) and transcribe it after recording is stopped
  3. call.record({language: ASRLanguage.ENGLISH_US, transcribe: true, stereo: true});

Use the following code if you want to build IVR with real-time recognition of some words/phrases from the specified array:

  1. require(Modules.ASR);
  2. //..
  3. mycall.say("Choose your color", Language.US_ENGLISH_FEMALE);
  4. mycall.addEventListener(CallEvents.PlaybackFinished, function (e) {
  5. mycall.sendMediaTo(myasr);
  6. });
  7. //...
  8. var myasr = VoxEngine.createASR(
  9. ASRLanguage.ENGLISH_US,
  10. ["Yellow", "Green", "Red", "Blue", "White", "Black"]);
  11. myasr.addEventListener(ASREvents.Result, function (e) {
  12. if (e.confidence > 0) mycall.say("You have chosen " + e.text + " color, confidence is " + e.confidence, Language.US_ENGLISH_FEMALE);
  13. else mycall.say("Couldn't recognize your answer", Language.US_ENGLISH_FEMALE);
  14. });
  15. myasr.addEventListener(ASREvents.SpeechCaptured, function (e) {
  16. mycall.stopMediaTo(myasr);
  17. });
  18. //...

Use the following code if you want to recognize call audio on-the-fly (streaming mode):

  1. require(Modules.ASR);
  2. var full_result = "", ts;
  3. //..
  4. mycall.say("Please start saying someting", Language.US_ENGLISH_FEMALE);
  5. mycall.addEventListener(CallEvents.PlaybackFinished, function (e) {
  6. mycall.sendMediaTo(myasr);
  7. });
  8. //...
  9. // Removing the dictionary to use freeform recognition
  10. var myasr = VoxEngine.createASR(ASRLanguage.ENGLISH_US);
  11. myasr.addEventListener(ASREvents.Result, function (e) {
  12. // Recognition results arrive here
  13. full_result += e.text + " ";
  14. // If CaptureStarted won't be fired in 5 seconds then stop recognition
  15. ts = setTimeout(recognitionEnded, 5000);
  16. });
  17. myasr.addEventListener(ASREvents.SpeechCaptured, function (e) {
  18. // After speech has been captured - don't stop sending media to ASR
  19. /*mycall.stopMediaTo(myasr);*/
  20. });
  21. myasr.addEventListener(ASREvents.CaptureStarted, function() {
  22. // Clear timeout if CaptureStarted has been fired
  23. clearTimeout(ts);
  24. });
  25. function recognitionEnded() {
  26. // Stop recognition
  27. myasr.stop();
  28. }
  29. //...

There is one important thing related to the streaming mode – CaptureStarted event can happen because of some background noise, so it’s a good idea to use our voice activity detection (VAD) in addition to ASR:

  1. mycall.handleMicStatus(true);
  2. mycall.addEventListener(CallEvents.MicStatusChange, function(e) {
  3. if (e.active) {
  4. // speech started
  5. } else {
  6. // speech ended
  7. }
  8. });

Comments