Question

I’m using a publically available AGI Script that wraps Google’s Speech Recognition API for converting speech to text in Asterisk. Basically, the script passes an audio file do Google and returns the text recognized from the audio.

This is working great, except for one deal breaking problem. Whenever the recognized text contains extended characters such as “á”, “ã”, “é”, etc., the dial plan gets a distorted string. For example, Google returns the text “não”, but ASTERISK gets “não”.

This, obviously, is related to the encoding… But I’m having trouble, due to limited knowledge in AGI and PEARL, determining where the problem. As far as I could determine, it could be

GOOGLE -> PEARL or PEARL -> ASTERISK

I hope someone can help me on this…

Was it helpful?

Solution

Got it!

Used a function called "decode" to decode the response from the Google API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top