0

I have implemented Speech to Text using RecognizerIntent and its working perfectly.

But I need to modify the working of it and want to add pause time while user is speaking, as practically user might stop for a while and then speak again, so I want the voice search to stay for few seconds for example 5 seconds if no voice heard then only it stops and process the speech.

I have tried using services buts its not working as desired. Prefer code examples.

[Implement something similar when I turn on Speech to Text key on Xperia Z3 keyboard, it accepts speech till user taps pause]

Thanks

Adil Bhatty
  • 17,190
  • 34
  • 81
  • 118
  • possible duplicate of [Android Speech Recognition as a service on Android 4.1 & 4.2](http://stackoverflow.com/questions/14940657/android-speech-recognition-as-a-service-on-android-4-1-4-2) – Nikolay Shmyrev Mar 04 '15 at 08:33

1 Answers1

0

full duplex example provides your needed feature ( handle pause inline )

This is diff implementation from RecognizerIntent and operates on a more complicated setup for handling mic's audio stream and for handling network connections for processing streams ( audio/UP , text/DOWN ).

So, if you want to use streaming AND continuously recognized speech that goes on until you signal the end of INPUT ( like click event on the mic icon in example ) it can be alot more involved.

background

google API sample

IBM API sample

They are complicated. Either can be implemented on a good , android , httpclient.

Robert Rowntree
  • 6,230
  • 2
  • 24
  • 43