Audio recording while using Mobile Speech Recognizer

Welcome! Forums Unity Plugins Mobile Speech Recognizer Audio recording while using Mobile Speech Recognizer

This topic contains 10 replies, has 2 voices, and was last updated by Piotr Piotr 2 months, 3 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1315

    yosi1202
    Participant

    I am using “Mobile Speech Recognizer”, and it works great,
    but i am trying to record audio while the speech recognizer is on and i doesnt work,
    is there a way to fix it? is there a way to use recorded audio (an audio clip object)
    to generate text with speech recognizer?

    #1322
    Piotr
    Piotr
    Keymaster

    How are you trying to record audio?
    There’s no supported way to use recorded clip as an input for recognition.

    #1323

    yosi1202
    Participant

    Microphone.Start(“”, true, 20, 44100);

    It works when not trying to recognize speech

    #1331
    Piotr
    Piotr
    Keymaster

    Yeah, I think it might be in conflict with plugin recording audio at the same time.
    My idea for fixing that is adding a callback which will pass recorded chunks to C# callback, something like OnAudioRecorded(audioChunk: byteArrayOrSomething).

    But… that would take some time. Would be able to contribute and add this feature on any platform?

    #1335

    yosi1202
    Participant

    sorry i didnt understand the solution, can you explain?

    #1336
    Piotr
    Piotr
    Keymaster

    Internally plugin receives audio chunks as a byte array and sends it to recognition engine and then send result to Unity. There could be another optional callback which would take those bytes before sending to engine so anyone from outside could use it measure volume, convert to mp3 etc.

    #1352

    yosi1202
    Participant

    OK, but how do I do that? SpeechRecognizer has only start and stop recording function and no callback for what you say, I dont see any options to change what is sent to the recognition engine or catch it before sending, if you could please explain what functions or callback can I us, there is nothing related to it in the code or the documentations

    #1354
    Piotr
    Piotr
    Keymaster

    I am asking if you would be able to add this feature to at least one platform.
    I could share source code with you and if that’s an option I would be able to cover 2nd platform.

    #1355

    yosi1202
    Participant

    That is what I am trying to do, but right now I dont have much to work with

    #1396

    yosi1202
    Participant

    ???

    #1399
    Piotr
    Piotr
    Keymaster

    For external viewers: yosi1202 was given access to Android project so he can start work on adding this feature.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.