Amazon Lex ASR instead of Google Chrome's ASR with Jovo Web client


#1

Hi, I have a Jovo web client and I am looking to use Amazon Lex SLU for automatic-speech-recognition (ASR) instead of the Google Chrome ASR as indicated in this Jovo Web Client readme “The SpeechRecognizer uses Google Chrome’s ASR…” Is this possible? If so, how?

On my backend Jovo server I have:

import { LexSlu } from 'jovo-slu-lex';
const lexSlu = new LexSlu({
	botAlias: 'xxx',
	botName: 'xxx',

	asr: {
		enabled: true
	},
	nlu: {
		enabled: false
	},

	credentials: {
		region: 'us-west-2',
		secretAccessKey: 'xxx',
		accessKeyId: 'xxx'
	}
});

const webPlatform = new WebPlatform();
webPlatform.use(
	// asr
	lexSlu,

	// nlu
	dfNlu
);

app.use(
	// platforms
	webPlatform,
	...
);

The documentation seems to fall off re how to connect up the frontend web client but after updating the webhook to point to my local Jovo server, and passing in a false param to jovoClient.startInputRecording(false) on mouse down to disable Jovo’s $speechRecognition I was able to send out the raw recorded audio instead of Google Chrome’s ASR interpreted text.

It feels very very close and perhaps the error is now on the Amazon side but unfortunately I get the error back that: “There is no alias named ‘TheAliasName’ for the bot named ‘thebotname’. Choose another alias.” What is the correct Amazon Lex setup? Is there any easy path for only using the ASR component of Amazon Lex? Thanks

With success I plugged in the Azure ASR to this web setup and it worked rather seamlessly.


#2

Hey @spencer Welcome to the Jovo Community!

Yes, that’s definately a Lex-setup-on-AWS issue. I had this a few months ago. Unfortunately, I can’t find my sample project :frowning:


#3

Found it:

new LexSlu({
  botName: "WebAssistantTest",
  botAlias: "WebTest",
  credentials: {
       region: 'us-east-1',
       secretAccessKey: 'secretAccessKey',
       accessKeyId: 'accessKeyId'
  }
});

image

Hope, it helps