Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lex SLU makes extra call to AWS when input is audio #1282

Closed
1 of 4 tasks
rmtuckerphx opened this issue Apr 16, 2022 · 1 comment
Closed
1 of 4 tasks

Lex SLU makes extra call to AWS when input is audio #1282

rmtuckerphx opened this issue Apr 16, 2022 · 1 comment

Comments

@rmtuckerphx
Copy link
Contributor

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

The processAudio function makes an AWS API call using RecognizeUtteranceCommand.
The processText function makes an AWS API call using RecognizeTextCommand.

Both RecognizeUtteranceCommandOutput and RecognizeTextCommandOutput have the same values:

  • interpretations
  • messages
  • sessionId
  • sessionState

Expected Behavior

It is inefficient and costly $$ to make 2 API calls to AWS when only 1 is needed.
If config.asr is set to true, then only processAudio needs to be called and the NluData can be built with that result.
No need to call processText.

If config.asr is set to false, then processText should be called.

Current Behavior

processText is called after processAudio

Error Log

No error

Your Environment

  • Jovo Framework version used: 4.2.8
  • Operating System: Windows 10 10.0.22000
@jankoenig
Copy link
Member

Thank you @rmtuckerphx! Your PR was merged and released today

rubenaeg pushed a commit to die-lautmaler/jovo-framework that referenced this issue Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants