[Docs] Consolidate per-model TTS examples into a single hub (#3234)

Signed-off-by: Yueqian Lin <linyueqian@outlook.com>
This commit is contained in:
Yueqian Lin authored and GitHub committed 2026-05-05 08:41:29 +12:00
1 parent e1b30061b6
commit 703e31fc47
58 files changed
+1694 -2675

No files matched your search

@@ -7,7 +7,7 @@ End-to-end offline inference tests for Voxtral TTS model.
Tests both synchronous (Omni) and async streaming (AsyncOmni) paths.
Equivalent to running:
python3 examples/offline_inference/voxtral_tts/end2end.py \
python3 examples/offline_inference/text_to_speech/voxtral_tts/end2end.py \
--model mistralai/Voxtral-4B-TTS-2603 \
--voice casual_female \
--text "Hello, how are you?" \
@@ -2,7 +2,7 @@
Offline inference regression tests: Qwen3-TTS _estimate_prompt_len.
Covers the four ref_audio input forms handled by the estimator in
examples/offline_inference/qwen3_tts/end2end.py:
examples/offline_inference/text_to_speech/qwen3_tts/end2end.py:
- bare local path
- file:// URI
- http:// URL
@@ -20,7 +20,9 @@ from unittest.mock import MagicMock
import numpy as np
import pytest
_examples_dir = str(Path(__file__).parent.parent.parent.parent / "examples" / "offline_inference" / "qwen3_tts")
_examples_dir = str(
Path(__file__).parent.parent.parent.parent / "examples" / "offline_inference" / "text_to_speech" / "qwen3_tts"
)
sys.path.insert(0, _examples_dir)
from end2end import _estimate_prompt_len # noqa: E402
+3 -1
View File
@@ -9,7 +9,9 @@ import numpy as np
import pytest
# Import the slerp function from the example script.
_examples_dir = str(Path(__file__).parent.parent.parent / "examples" / "online_serving" / "qwen3_tts")
_examples_dir = str(
Path(__file__).parent.parent.parent / "examples" / "online_serving" / "text_to_speech" / "qwen3_tts"
)
sys.path.insert(0, _examples_dir)
from speaker_embedding_interpolation import slerp # noqa: E402
+1 -1
View File
@@ -1240,7 +1240,7 @@ class OmniRunner:
if isinstance(prompts, str):
prompts = [prompts]
# Qwen-TTS: follow examples/offline_inference/qwen3_tts/end2end.py style.
# Qwen-TTS: follow examples/offline_inference/text_to_speech/qwen3_tts/end2end.py style.
# Stage 0 expects token placeholders + additional_information (text/speaker/task_type/...),
# and Talker replaces embeddings in preprocess based on additional_information only.
is_tts_model = "Qwen3-TTS" in self.model_name or "qwen3_tts" in self.model_name.lower()
@@ -3,7 +3,7 @@
"""Unit tests for the Voxtral TTS demo text preprocessing helper.
These tests intentionally cover only behavior ported into
examples/online_serving/voxtral_tts/text_preprocess.py.
examples/online_serving/text_to_speech/voxtral_tts/text_preprocess.py.
"""
import importlib.util
@@ -13,7 +13,12 @@ from pathlib import Path
import pytest
_HELPER_PATH = (
Path(__file__).resolve().parents[4] / "examples" / "online_serving" / "voxtral_tts" / "text_preprocess.py"
Path(__file__).resolve().parents[4]
/ "examples"
/ "online_serving"
/ "text_to_speech"
/ "voxtral_tts"
/ "text_preprocess.py"
)
pytestmark = [pytest.mark.core_model, pytest.mark.cpu]