Skip to content

TTS running before translation on some occassions #221

Open

Description

@dscroft

An issue sometimes occurs when combining TTS, translation and animation.
This is a sporadic bug, it does not occur every time but appears to be based on how quickly the translation is returned.

Requirements:

  • Presentation mode.
  • Animated TTS block.
  • Experimental Google translate is on.

The TTS will speak the original un-translated text but use the voice for the translated language. It sounds like someone doing an impression of a foreign accent.

The expected behaviour, which will sometimes occur, is for the TTS to wait for the translation to complete and then read the translation.

Screen recording attached https://github.com/user-attachments/assets/5f73707b-b589-4232-be3a-721450790613

Tested in Google Chrome.

Example:

<!--
author: ...
language: en
narrator: UK English Female
mode: Presentation
-->

# Issue

## Demo

Material that is always visible works correctly

    --{{0}}--
Material that is always visible works correctly    

    {{|>}}
Material that is manually triggered works correctly

    --{{1}}--
Material that appears in an animation block appears correctly in the original language and is read out correctly by the TTS.

    {{1}}
Material that appears in an animation block appears correctly in the original language and is read out correctly by the TTS.

    {{2}}
> Now use the translation function to change the language.

    --{{3}}--
Material that appears in an animation block appears correctly but is read out as per the original language.

    {{3}}
Material that appears in an animation block appears correctly but is read out as per the original language but with a different voice.

Activity

  1. andre-dietrich commented on Jan 11, 2025

    @andre-dietrich
    Member

    Thanks for submitting ... We already use a delay to give the TTS some time before passing the translated text, like at the starting of a new page ... However, this does not seem to work for all browsers, probably also based on the CPU we will have to check if the translation (google) is ready before retrieving the text ... I will have to dive deeper into this, since the google-translation-api does not offer a lot ... ;-)

  2. added
    🪲 bug
    on Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🪲 bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions