Search code examples
unity-game-engineibm-watsonspeech-to-textliteralstranscription

IBM Watson Speech to text! Transcript the audiio literally, with gramatical errors


I'm trying the speech to text plugin (Unity watson SDK) to develop an English grammar correction class prototype plugin. I want it to translate literally what the user is saying, with gramatically incorrect sentences.

Example: the user says > AUDIO "What you do want?" instead of "What do you want?".

But the plugin always tries to correct it. Examples:

AUDIO "What you do want?" results in TEXT > "What do you do want" or changing the sentences completely.

Is there an option or function that I'm missing? Or is just how the app works to interpret the audio? Any one familiar with the IBM Waton SDK? Any hint or advice is appreciated.


Solution

  • My speech transcribes as "What you do want" when using the example. You can access word alternatives in the response as well:

    private void OnRecognize(SpeechRecognitionEvent result, Dictionary<string, object> customData)
    {
        if (result != null && result.results.Length > 0)
        {
            foreach (var res in result.results)
            {
                foreach(var wordAlt in res.word_alternatives)
                {
                    foreach(WordAlternativeResult wordAltResult in wordAlt.alternatives)
                    {
                        Log.Debug("ExampleStreaming", "word: {0}, confidence: {1}", wordAltResult.word, wordAltResult.confidence);
                    }
                }
            }
        }
    }