Skip to content

[Bug] wav file seems to contain Chinese words at the end #4187

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

Open
dcolley opened this issue Apr 11, 2025 · 2 comments
Open

[Bug] wav file seems to contain Chinese words at the end #4187

dcolley opened this issue Apr 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@dcolley
Copy link

dcolley commented Apr 11, 2025

Describe the bug

I am trying to produce audio that switches between languages.
tts seems to split the paragraph at the correct point, however the audio output contains (what appears to be) Chinese words after the French sentence.

To Reproduce

tts --text "Translate this to french, How are you? (Comment ça va?)" --model_name "tts_models/multilingual/multi-dataset/xtts_v2" --speaker_idx "Annmarie Nele" --language_idx en --out_path speech1.wav
tts_models/multilingual/multi-dataset/xtts_v2 is already downloaded.
Using model: xtts
Text: Translate this to french, How are you? (Comment ça va?)
Text split into sentences.
Input: ['Translate this to french, How are you?', '(Comment ça va?)']
Processing time: 4.410
Real-time factor: 0.462
Saved TTS output to speech1.wav

Expected behavior

No response

Logs

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": null
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.6.0",
        "TTS": "0.26.0",
        "numpy": "1.26.4"
    },
    "System": {
        "OS": "Darwin",
        "architecture": [
            "64bit",
            ""
        ],
        "processor": "arm",
        "python": "3.11.11",
        "version": "Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041"
    }
}

Additional context

No response

@dcolley dcolley added the bug Something isn't working label Apr 11, 2025
@dcolley
Copy link
Author

dcolley commented Apr 11, 2025

speech1.wav.zip

@eginhard
Copy link
Contributor

XTTS wasn't trained on code-switched data, so the behaviour in that case is undefined and issues can be expected. You could dive into the XTTS code though and insert additional language tokens at the right points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants