Dave O Well-Known Member Licensed User Longtime User Nov 12, 2018 #1 I'm using the XSpeechRecognizer library (updated by @Multiverse app) to convert spoken reminders to text. It's working pretty well, but I do have a few questions: - It stops the recording and fires the EndOfSpeech event after detecting silence after 1-2 seconds. Is this duration configurable? - Ideally I'd like to keep recording until a button is tapped, rather than use the EndOfSpeech event. Possible? - My app currently offers either an audio file or recognized text (but not both). It would be a real bonus if I could save the audio as a file as well as capturing the recognized text. I understand that the BufferReceived event stopped working after ICS (Android 4.0), so is there any other way of doing this, either simultaneously or by possibly saving the audio file and feeding it to a recognizer immediately afterward? Any help appreciated. Thanks! Last edited: Nov 15, 2018
I'm using the XSpeechRecognizer library (updated by @Multiverse app) to convert spoken reminders to text. It's working pretty well, but I do have a few questions: - It stops the recording and fires the EndOfSpeech event after detecting silence after 1-2 seconds. Is this duration configurable? - Ideally I'd like to keep recording until a button is tapped, rather than use the EndOfSpeech event. Possible? - My app currently offers either an audio file or recognized text (but not both). It would be a real bonus if I could save the audio as a file as well as capturing the recognized text. I understand that the BufferReceived event stopped working after ICS (Android 4.0), so is there any other way of doing this, either simultaneously or by possibly saving the audio file and feeding it to a recognizer immediately afterward? Any help appreciated. Thanks!
Multiverse app Active Member Licensed User Longtime User Mar 16, 2019 #2 Dave O said: - It stops the recording and fires the EndOfSpeech event after detecting silence after 1-2 seconds. Is this duration configurable? Click to expand... Yes, pass your desired time while initializing the SP object Dave O said: Ideally I'd like to keep recording until a button is tapped, rather than use the EndOfSpeech event. Possible? Click to expand... I would say restart the listening after the listening stops, but a very hacky way to do it. Take a look here: https://www.b4x.com/android/forum/threads/include-so-library-in-b4a-library.74250/#post-569854 Sorry for the late reply Upvote 0
Dave O said: - It stops the recording and fires the EndOfSpeech event after detecting silence after 1-2 seconds. Is this duration configurable? Click to expand... Yes, pass your desired time while initializing the SP object Dave O said: Ideally I'd like to keep recording until a button is tapped, rather than use the EndOfSpeech event. Possible? Click to expand... I would say restart the listening after the listening stops, but a very hacky way to do it. Take a look here: https://www.b4x.com/android/forum/threads/include-so-library-in-b4a-library.74250/#post-569854 Sorry for the late reply
Multiverse app Active Member Licensed User Longtime User Mar 16, 2019 #3 Dave O said: so is there any other way of doing this, either simultaneously or by possibly saving the audio file and feeding it to a recognizer immediately afterward? Click to expand... You can do this by saving the audio and using Google's Cloud API to get the text Take a look at documentation here https://cloud.google.com/speech-to-text/docs/reference/rest/v1/speech/recognize Haven't tried it though Upvote 0
Dave O said: so is there any other way of doing this, either simultaneously or by possibly saving the audio file and feeding it to a recognizer immediately afterward? Click to expand... You can do this by saving the audio and using Google's Cloud API to get the text Take a look at documentation here https://cloud.google.com/speech-to-text/docs/reference/rest/v1/speech/recognize Haven't tried it though