AWS Polly reads word 're-record' as 're minus record'

76 views Asked by At

I'm using AWS Polly in my Android app. I'm pretty sure that it was reading correctly re-record before.

Idk what's changed but Polly reads it as "re minus record". Is there a way to exclude this issue by using SSML tags?

I tried with different voice types (male and female), but no luck.

private fun getSignedUrl(text: String, speechRate: Int): String {
    // Create speech synthesis request.
    val synthesizeSpeechPresignRequest = SynthesizeSpeechPresignRequest()
        .withOutputFormat(OutputFormat.Mp3)
        .withText("<speak><prosody rate=\"${speechRate}%\">$text</prosody></speak>")
        .withTextType("ssml") //https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html
        .withVoiceId(voices[speechGender].id)
        .withEngine(Engine.Neural)
        .withLexiconNames("globalenglish"))

    return client?.getPresignedSynthesizeSpeechUrl(synthesizeSpeechPresignRequest)?.toString()?:""
}

Thanks in advance.

UPDATE:

I’ve just tested on the console here: https://eu-central-1.console.aws.amazon.com/polly/home/SynthesizeSpeech?region=eu-central-1

It's broken only if you activate lexicon as globalenglish.

enter image description here

1

There are 1 answers

0
Orcun Sevsay On BEST ANSWER

It's a problem with the Lexicon that's used. Without using lexicons, it works perfectly splendid!