asterisk / aeap-speech-to-text

Asterisk external speech to text application
Apache License 2.0
42 stars 26 forks source link

How to use SpeechProcessingSound() ? #4

Open ringneck opened 1 year ago

ringneck commented 1 year ago

Hi,

I've tried using speechProcessingSound() dialplan like this.

exten => speech,1,Verbose(0, This is Dynamic sub-speech-dynamic-google SERVER:${ARG1}, RESPONSE-TYPE:${ARG2}, NUM:${ARG3} ) same => n,Set(RESPONSE-TYPE=${IF($["${ISNULL(${ARG2})}"="1"]?question:${ARG2})}) same => n,SpeechCreate(dynamic-google-${ARG1}) same => n,Set(SPEECH-ERROR=${ERROR}) same => n,ExecIf($["${ERROR}"="1"]?return()) same => n,SpeechProcessingSound(pls-hold-process-tx)) <----- here but, working not same => n,SpeechStart() same => n,SpeechBackground(dynamic-beep,${ARG4}) same => n,NoOp(상태확인: 1 이면 말하는 중, ${SPEECH(spoke)}) same => n,Verbose(0,Text:${SPEECH_TEXT(0)}, Score:${SPEECH_SCORE(0)}) same => n,Set(RESPONSE-${RESPONSE-TYPE}-${ARG3}=${STRREPLACE(SPEECH_TEXT(0)," ","")}) same => n,SpeechDestroy

It doesn't seem to work.

thanks

dcowan-london commented 11 months ago

I haven't tested myself, but have you tried moving SpeechProcessingSound() to after SpeechStart()?