Skip to content

Lex can't detect certain phrases

0

Using a Lex V2 bot and choosing a slot with slotType of Amazon.UKPostalCode, I found that the bot never works when saying DN20 as the start of the post code. Each time, it's translated as DN2. This is being used as a voice bot, not a text bot. Does anyone have any advice on this? To test yourself, set it up and say DN20 9HF.

asked a year ago186 views

2 Answers
6

It was happen because Lex V2 uses speech-to-text before slot resolution which the transcription engine may drop or misinterpret the zero in "DN20", especially if it's spoken quickly or without clear separation, the AMAZON.UKPostalCode slot type only supports specific formats and does not validate actual postcodes, just the structure.

https://docs.aws.amazon.com/lexv2/latest/dg/built-in-slot-uk-postal-code.html

EXPERT

answered a year ago

0

Hey,

Hope you're keeping well.

This is likely an Amazon Transcribe issue rather than Lex slot resolution. Lex V2 voice bots rely on Transcribe to convert speech to text, and certain number sequences (like “twenty” vs “two zero”) can be misinterpreted if spoken quickly. You can improve accuracy by enabling a custom vocabulary in your bot’s voice configuration with entries for “DN20” and similar postcodes, or by switching the slot type to a custom regex pattern that accepts the raw transcription. In the console, edit your bot’s locale settings, add a custom vocabulary file, and redeploy so Transcribe recognizes those patterns more reliably.

Thanks and regards,
Taz

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.