How to send custom “params” of Asterisk External Application Protocol: Speech to Text Engine (aeap)

I used aeap for speech to text service, this is my aeap.conf for ws server

[my-speech-to-text1]
type=client
codecs=all
url=ws://127.0.0.1:9098
protocol=speech_to_text

I created dialplan with agi using Speech application and my ws service have received stream audio when user talk, how can i send custom param with agi to my ws service. For example: { language: en, provider: google }

I have read the following article and they said:
Asterisk may send a set request any time after a successful setup. Custom “params” can be any name value pair passed using the speech to text dialplan attribute function. As well the following fixed “params” may be sent:

Speech To Text Article

Background information:

Asterisk Server Version: 18
OS: Debian 10

You can configure them in the aeap.conf configuration file[1] or as the article said using the dialplan function[2].

[1] asterisk/aeap.conf.sample at master · asterisk/asterisk · GitHub
[2] Asterisk 20 Function_SPEECH_ENGINE - Asterisk Project - Asterisk Project Wiki

1 Like
[my-speech-to-text-en]
type=client
codecs=all
url=ws://127.0.0.1:9098
protocol=speech_to_text
@lang= {my-variable}

What happen if i want to send a variable to params value. Not just hard code. Please tell me if you need more info from me

Then you use the dialplan function.

Can you give me a example of SPEECH_ENGINE. Because the docs it says it can get and set at the same time. So if i don’t provide param then it a GET. and if i do it’s a SET?
Sorry for my bad english

It works the same as any other dialplan function. To set a value:

Set(SPEECH_ENGINE(parameter)=value)
1 Like

thank you. No way i can overcome this without you. Very appreciated

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.