Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

fix: fail on invalid speech chunks, pass clean text unchanged, and update WebUI pause docs

Ismael Camacho6e43b0661360
diff --git a/app/services/voice.py b/app/services/voice.py
index 632e941f..6226d84c 100644
--- a/app/services/voice.py
+++ b/app/services/voice.py
@@ -858,51 +858,50 @@ def _tts_with_pauses(
voice_file=chunk_audio_file,
voice_volume=voice_volume,
)
- if not chunk_submaker or not os.path.exists(chunk_audio_file):
+ if not chunk_submaker or not os.path.exists(chunk_audio_file) or os.path.getsize(chunk_audio_file) == 0:
logger.error(
- f"failed to synthesize speech chunk: {speech_text[:50]}"
+ f"failed to synthesize speech chunk (audio missing or empty): {speech_text[:50]}"
)
return None
chunk_wav = os.path.join(temp_dir, f"speech_{idx}_decoded.wav")
- chunk_samples = 0
-
- # 真实音频:解码为 24000Hz 16-bit mono PCM WAV
- if os.path.getsize(chunk_audio_file) > 0:
- ffmpeg_binary = utils.get_ffmpeg_binary()
- cmd = [
- ffmpeg_binary,
- "-y",
- "-i",
- chunk_audio_file,
- "-vn",
- "-ac",
- "1",
- "-ar",
- str(SAMPLE_RATE),
- "-codec:a",
- "pcm_s16le",
- chunk_wav,
- ]
- res = subprocess.run(cmd, capture_output=True, text=True, check=False)
- if res.returncode == 0 and os.path.exists(chunk_wav):
- try:
- with wave.open(chunk_wav, "rb") as wf:
- chunk_samples = wf.getnframes()
- except Exception as e:
- logger.error(f"failed to read decoded wave: {e}")
-
- # 单测兼容:针对 0 字节 mock 文件或解码失败情况的回退
+ ffmpeg_binary = utils.get_ffmpeg_binary()
+ cmd = [
+ ffmpeg_binary,
+ "-y",
+ "-i",
+ chunk_audio_file,
+ "-vn",
+ "-ac",
+ "1",
+ "-ar",
+ str(SAMPLE_RATE),
+ "-codec:a",
+ "pcm_s16le",
+ chunk_wav,
+ ]
+ res = subprocess.run(cmd, capture_output=True, text=True, check=False)
+ if res.returncode != 0 or not os.path.exists(chunk_wav) or os.path.getsize(chunk_wav) == 0:
+ logger.error(
+ f"failed to decode speech chunk audio to PCM WAV: {speech_text[:50]}, "
+ f"error: {(res.stderr or res.stdout or '').strip()}"
+ )
+ return None
+
+ try:
+ with wave.open(chunk_wav, "rb") as wf:
+ chunk_samples = wf.getnframes()
+ except Exception as e:
+ logger.error(
+ f"failed to read decoded speech wave: {speech_text[:50]}, error: {e}"
+ )
+ return None
+
if chunk_samples <= 0:
- chunk_duration = get_audio_duration(chunk_audio_file)
- if chunk_duration <= 0:
- chunk_duration = get_audio_duration(chunk_submaker)
- chunk_samples = int(round(chunk_duration * SAMPLE_RATE))
- with wave.open(chunk_wav, "wb") as wf:
- wf.setnchannels(1)
- wf.setsampwidth(2)
- wf.setframerate(SAMPLE_RATE)
- wf.writeframes(b"\x00\x00" * chunk_samples)
+ logger.error(
+ f"decoded speech chunk has no audio samples: {speech_text[:50]}"
+ )
+ return None
# 字幕偏移直接依据实际样本数精确计算,不存在 MP3 帧累积漂移
current_offset_seconds = cumulative_samples / float(SAMPLE_RATE)
@@ -947,8 +946,18 @@ def tts(
voice_file: str,
voice_volume: float = 1.0,
) -> Union[SubMaker, None]:
+ # 无停顿标签时,原样直通原始文本,避免无意义的正则处理或空白截断
+ if not utils.has_pause_tags(text):
+ return _single_tts(
+ text=text,
+ voice_name=voice_name,
+ voice_rate=voice_rate,
+ voice_file=voice_file,
+ voice_volume=voice_volume,
+ )
+
# 仅 Azure TTS v1 (Edge TTS) 且脚本包含停顿标签时进入分段合成
- if is_azure_v1_voice(voice_name) and utils.has_pause_tags(text):
+ if is_azure_v1_voice(voice_name):
return _tts_with_pauses(
text=text,
voice_name=voice_name,
@@ -956,7 +965,9 @@ def tts(
voice_file=voice_file,
voice_volume=voice_volume,
)
- # 其他声音提供商(如 Gemini、Fish Audio、SiliconFlow、Kokoro)或无停顿脚本保持单次合成
+
+ # 其他声音提供商(如 Gemini、Fish Audio、SiliconFlow、Kokoro)包含停顿标签时,
+ # 清理停顿标签后以单次请求合成
clean_text = utils.remove_pause_tags(text)
return _single_tts(
text=clean_text,
diff --git a/test/services/test_voice.py b/test/services/test_voice.py
index b4dfcfaf..7f2746fc 100644
--- a/test/services/test_voice.py
+++ b/test/services/test_voice.py
@@ -1354,6 +1354,18 @@ class TestVoiceService(unittest.TestCase):
self.assertEqual(vs.convert_rate_to_percent(""), "+0%")
+def _write_test_wav(filepath: str, duration_seconds: float = 1.0, sample_rate: int = 24000) -> str:
+ import wave
+ Path(filepath).parent.mkdir(parents=True, exist_ok=True)
+ num_samples = int(round(duration_seconds * sample_rate))
+ with wave.open(filepath, "wb") as wf:
+ wf.setnchannels(1)
+ wf.setsampwidth(2)
+ wf.setframerate(sample_rate)
+ wf.writeframes(b"\x00\x00" * num_samples)
+ return filepath
+
+
class TestElevenLabsVoice(unittest.TestCase):
def test_is_elevenlabs_voice_true(self):
@@ -1603,20 +1615,20 @@ class TestElevenLabsVoice(unittest.TestCase):
fake_sub2.offset = [(2000000, 18000000)]
def fake_single_tts(text, voice_name, voice_rate, voice_file, voice_volume=1.0):
- Path(voice_file).touch()
if "Segment 1" in text:
+ _write_test_wav(voice_file, 1.5)
return fake_sub1
+ _write_test_wav(voice_file, 1.8)
return fake_sub2
def fake_silence(duration, voice_file):
- Path(voice_file).touch()
+ _write_test_wav(voice_file, duration)
return True
with (
tempfile.TemporaryDirectory() as tmp_dir,
patch.object(vs, "_single_tts", side_effect=fake_single_tts) as mock_single_tts,
patch.object(vs, "generate_silent_audio", side_effect=fake_silence) as mock_silence,
- patch.object(vs, "get_audio_duration", side_effect=[1.5, 2.0, 1.8]),
patch.object(vs, "_concat_audio_files", return_value=True) as mock_concat,
):
out_file = str(Path(tmp_dir) / "combined.mp3")
@@ -1696,18 +1708,17 @@ class TestElevenLabsVoice(unittest.TestCase):
fake_sub.offset = [(1000000, 12000000)]
def fake_single_tts(text, voice_name, voice_rate, voice_file, voice_volume=1.0):
- Path(voice_file).touch()
+ _write_test_wav(voice_file, 1.2)
return fake_sub
def fake_silence(duration, voice_file):
- Path(voice_file).touch()
+ _write_test_wav(voice_file, duration)
return True
with (
tempfile.TemporaryDirectory() as tmp_dir,
patch.object(vs, "_single_tts", side_effect=fake_single_tts),
patch.object(vs, "generate_silent_audio", side_effect=fake_silence) as mock_silence,
- patch.object(vs, "get_audio_duration", side_effect=[1.5, 1.2]),
patch.object(vs, "_concat_audio_files", return_value=True),
):
# Leading pause: [pause: 1.5s] Hello
@@ -1727,7 +1738,6 @@ class TestElevenLabsVoice(unittest.TestCase):
tempfile.TemporaryDirectory() as tmp_dir,
patch.object(vs, "_single_tts", side_effect=fake_single_tts),
patch.object(vs, "generate_silent_audio", side_effect=fake_silence) as mock_silence,
- patch.object(vs, "get_audio_duration", side_effect=[1.2, 2.0]),
patch.object(vs, "_concat_audio_files", return_value=True),
):
# Trailing pause: Hello [pause: 2s]
@@ -1747,7 +1757,7 @@ class TestElevenLabsVoice(unittest.TestCase):
def test_pause_script_with_only_pauses(self):
"""测试脚本只包含停顿标签时的纯静音生成与安全性。"""
def fake_silence(duration, voice_file):
- Path(voice_file).touch()
+ _write_test_wav(voice_file, duration)
return True
with (
@@ -2032,6 +2042,70 @@ class TestElevenLabsVoice(unittest.TestCase):
# 验证最终解码时长与字幕结尾完全一致(17.50s)
self.assertAlmostEqual(decoded_duration, 17.50, delta=0.06)
+ def test_tts_with_pauses_fails_on_empty_chunk_audio(self):
+ """回归测试:当语音片段合成生成了空文件(0字节)或文件丢失时,_tts_with_pauses 报错失败返回 None,绝不能回退生成静音掩盖错误。"""
+ from edge_tts.srt_composer import Subtitle
+
+ fake_sub = vs.ensure_legacy_submaker_fields(vs.SubMaker())
+ fake_sub.cues = [
+ Subtitle(1, timedelta(seconds=0.0), timedelta(seconds=1.0), "Hello"),
+ ]
+
+ def fake_single_tts_empty(text, voice_name, voice_rate, voice_file, voice_volume=1.0):
+ Path(voice_file).touch() # 0-byte empty file
+ return fake_sub
+
+ with tempfile.TemporaryDirectory() as tmp_dir:
+ out_file = str(Path(tmp_dir) / "out.mp3")
+ with patch.object(vs, "_single_tts", side_effect=fake_single_tts_empty):
+ result = vs.tts(
+ text="Hello [pause: 1s] World",
+ voice_name="zh-CN-XiaoxiaoNeural",
+ voice_rate=1.0,
+ voice_file=out_file,
+ )
+ self.assertIsNone(result)
+
+ def test_tts_with_pauses_fails_on_corrupted_chunk_audio(self):
+ """回归测试:当语音片段音频损坏无法解码为 PCM 时,_tts_with_pauses 必须报错返回 None,而不是用静音代替旁白继续执行。"""
+ from edge_tts.srt_composer import Subtitle
+
+ fake_sub = vs.ensure_legacy_submaker_fields(vs.SubMaker())
+ fake_sub.cues = [
+ Subtitle(1, timedelta(seconds=0.0), timedelta(seconds=1.0), "Hello"),
+ ]
+
+ def fake_single_tts_corrupted(text, voice_name, voice_rate, voice_file, voice_volume=1.0):
+ with open(voice_file, "wb") as f:
+ f.write(b"NOT_A_VALID_AUDIO_FILE_DATA_CORRUPTED_1234567890")
+ return fake_sub
+
+ with tempfile.TemporaryDirectory() as tmp_dir:
+ out_file = str(Path(tmp_dir) / "out.mp3")
+ with patch.object(vs, "_single_tts", side_effect=fake_single_tts_corrupted):
+ result = vs.tts(
+ text="Hello [pause: 1s] World",
+ voice_name="zh-CN-XiaoxiaoNeural",
+ voice_rate=1.0,
+ voice_file=out_file,
+ )
+ self.assertIsNone(result)
+
+ def test_tts_passes_original_text_unchanged_without_pauses(self):
+ """测试无停顿标签时,tts 将原始文本原样直通给 _single_tts,不执行正则替换或清洗。"""
+ original_text = " Leading and trailing spaces, [regular bracket] and punctuation! \nNew line here. "
+ with patch.object(vs, "_single_tts", return_value="dummy_submaker") as mock_single:
+ result = vs.tts(
+ text=original_text,
+ voice_name="zh-CN-XiaoxiaoNeural",
+ voice_rate=1.0,
+ voice_file="out.mp3",
+ )
+ self.assertEqual(result, "dummy_submaker")
+ mock_single.assert_called_once()
+ called_text = mock_single.call_args[1].get("text") or mock_single.call_args[0][0]
+ self.assertEqual(called_text, original_text)
+
if __name__ == "__main__":
# python -m unittest test.services.test_voice.TestVoiceService.test_azure_tts_v1
diff --git a/webui/i18n/de.json b/webui/i18n/de.json
index d2e5db0f..6715469f 100644
--- a/webui/i18n/de.json
+++ b/webui/i18n/de.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Ausgewähltes Skript und Keywords übernommen",
"Auto Detect": "Automatisch erkennen",
"Video Script": "Videoskript (optional)",
- "Video Script Help": "Leer lassen, um es per KI aus dem Videothema zu erstellen. Sinnvolle Zeichensetzung verbessert die Untertitel. Mit [pause: 2s] oder [stille: 1s] können Pausen eingefügt werden.",
+ "Video Script Help": "Leer lassen, um es per KI aus dem Videothema zu erstellen. Sinnvolle Zeichensetzung verbessert die Untertitel. Unterstützt bei Azure TTS V1 (Edge TTS): [pause: 2s] oder [stille: 1s] zum Einfügen von Pausen nutzen (0.1–10s).",
"Generate Video Keywords": "Keywords mit KI erstellen",
"Please Enter the Video Subject": "Bitte geben Sie zuerst das Drehbuch an",
"Please Enter the Video Subject First": "Bitte geben Sie zuerst das Videothema ein",
diff --git a/webui/i18n/en.json b/webui/i18n/en.json
index 7264c004..64d7c48a 100644
--- a/webui/i18n/en.json
+++ b/webui/i18n/en.json
@@ -53,7 +53,7 @@
"LoomLoom Candidate Applied": "Selected script and keywords applied",
"Auto Detect": "Auto Detect",
"Video Script": "Video Script (Optional)",
- "Video Script Help": "Leave blank to generate it with AI from the video subject. Proper punctuation helps generate subtitles. Use [pause: 2s] or [silence: 1s] to add custom pauses.",
+ "Video Script Help": "Leave blank to generate it with AI from the video subject. Proper punctuation helps generate subtitles. Supported on Azure TTS V1 (Edge TTS): use [pause: 2s] or [silence: 1s] to insert custom pauses (0.1–10s).",
"Generate Video Keywords": "Generate Keywords with AI",
"Please Enter the Video Subject": "Please Enter the Video Script First",
"Please Enter the Video Subject First": "Please enter the video subject first",
diff --git a/webui/i18n/es.json b/webui/i18n/es.json
index 4a6ade02..c8df1011 100644
--- a/webui/i18n/es.json
+++ b/webui/i18n/es.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Guion y palabras clave seleccionados aplicados",
"Auto Detect": "Detección automática",
"Video Script": "Guion del vídeo (opcional)",
- "Video Script Help": "Déjalo vacío para generarlo con IA a partir del tema del vídeo. Una puntuación adecuada ayuda a generar los subtítulos. Puedes insertar pausas con [pausa: 2s] o [silencio: 1s].",
+ "Video Script Help": "Déjalo vacío para generarlo con IA a partir del tema del vídeo. Una puntuación adecuada ayuda a generar los subtítulos. Compatible con Azure TTS V1 (Edge TTS): usa [pausa: 2s] o [silencio: 1s] para insertar pausas (0.1–10s).",
"Generate Video Keywords": "Generar palabras clave con IA",
"Please Enter the Video Subject": "Introduce primero el guion del vídeo",
"Please Enter the Video Subject First": "Introduce primero el tema del vídeo",
diff --git a/webui/i18n/fr.json b/webui/i18n/fr.json
index 5a68d69f..d4084989 100644
--- a/webui/i18n/fr.json
+++ b/webui/i18n/fr.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Script et mots-clés sélectionnés appliqués",
"Auto Detect": "Détection automatique",
"Video Script": "Script de la vidéo (Optionnel)",
- "Video Script Help": "Laissez vide pour le générer par IA à partir du sujet. Une bonne ponctuation aide à la génération des sous-titres. Utilisez [pause: 2s] ou [silence: 1s] pour insérer des pauses.",
+ "Video Script Help": "Laissez vide pour le générer par IA à partir du sujet. Une bonne ponctuation aide à la génération des sous-titres. Pris en charge avec Azure TTS V1 (Edge TTS) : utilisez [pause: 2s] ou [silence: 1s] pour insérer des pauses (0.1–10s).",
"Generate Video Keywords": "Générer les mots-clés par IA",
"Please Enter the Video Subject": "Veuillez d'abord saisir le script de la vidéo",
"Please Enter the Video Subject First": "Veuillez d'abord saisir le sujet de la vidéo",
diff --git a/webui/i18n/id.json b/webui/i18n/id.json
index b9a4216e..77e69f0c 100644
--- a/webui/i18n/id.json
+++ b/webui/i18n/id.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Skrip dan kata kunci terpilih diterapkan",
"Auto Detect": "Deteksi Otomatis",
"Video Script": "Skrip Video (Opsional)",
- "Video Script Help": "Kosongkan untuk membuatnya dengan AI dari topik video. Tanda baca yang tepat membantu pembuatan subtitle. Gunakan [pause: 2s] atau [silence: 1s] untuk jeda kustom.",
+ "Video Script Help": "Kosongkan untuk membuatnya dengan AI dari topik video. Tanda baca yang tepat membantu pembuatan subtitle. Didukung di Azure TTS V1 (Edge TTS): gunakan [pause: 2s] atau [silence: 1s] untuk jeda kustom (0.1–10s).",
"Generate Video Keywords": "Buat Kata Kunci dengan AI",
"Please Enter the Video Subject": "Silakan Masukkan Skrip Video Terlebih Dahulu",
"Please Enter the Video Subject First": "Harap masukkan subjek video terlebih dahulu",
diff --git a/webui/i18n/it.json b/webui/i18n/it.json
index 7271a55a..4490c327 100644
--- a/webui/i18n/it.json
+++ b/webui/i18n/it.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Testo e parole chiave selezionati applicati",
"Auto Detect": "Rilevamento automatico",
"Video Script": "Testo del video (facoltativo)",
- "Video Script Help": "Lascia vuoto per generarlo con l'IA a partire dall'argomento del video. Una corretta punteggiatura aiuta a generare i sottotitoli. Usa [pausa: 2s] o [silenzio: 1s] per inserire pause.",
+ "Video Script Help": "Lascia vuoto per generarlo con l'IA a partire dall'argomento del video. Una corretta punteggiatura aiuta a generare i sottotitoli. Supportato con Azure TTS V1 (Edge TTS): usa [pausa: 2s] o [silenzio: 1s] per inserire pause (0.1–10s).",
"Generate Video Keywords": "Genera parole chiave con l'IA",
"Please Enter the Video Subject": "Inserisci prima il testo del video",
"Please Enter the Video Subject First": "Inserisci prima l'argomento del video",
diff --git a/webui/i18n/ko.json b/webui/i18n/ko.json
index 7c2cb9fa..06c8e988 100644
--- a/webui/i18n/ko.json
+++ b/webui/i18n/ko.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "선택한 스크립트와 키워드가 적용되었습니다",
"Auto Detect": "자동 감지",
"Video Script": "영상 스크립트 (선택)",
- "Video Script Help": "비워 두면 영상 주제로부터 AI가 생성합니다. 문장 부호를 잘 사용하면 자막 생성에 도움이 됩니다. [pause: 2s] 또는 [일시중지: 2s]로 원하는 멈춤 시간을 추가할 수 있습니다.",
+ "Video Script Help": "비워 두면 영상 주제로부터 AI가 생성합니다. 문장 부호를 잘 사용하면 자막 생성에 도움이 됩니다. Azure TTS V1 (Edge TTS) 지원: [pause: 2s] 또는 [일시중지: 2s]로 원하는 멈춤 시간을 추가할 수 있습니다 (0.1–10초).",
"Generate Video Keywords": "AI로 키워드 생성",
"Please Enter the Video Subject": "먼저 영상 스크립트를 입력하세요",
"Please Enter the Video Subject First": "먼저 영상 주제를 입력하세요",
diff --git a/webui/i18n/pt.json b/webui/i18n/pt.json
index 43a63ad2..df0d0418 100644
--- a/webui/i18n/pt.json
+++ b/webui/i18n/pt.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Roteiro e palavras-chave selecionados aplicados",
"Auto Detect": "Detectar Automaticamente",
"Video Script": "Roteiro do vídeo (opcional)",
- "Video Script Help": "Deixe em branco para gerá-lo com IA a partir do tema do vídeo. Uma pontuação adequada ajuda a gerar as legendas. Use [pausa: 2s] ou [silêncio: 1s] para inserir pausas.",
+ "Video Script Help": "Deixe em branco para gerá-lo com IA a partir do tema do vídeo. Uma pontuação adequada ajuda a gerar as legendas. Suportado no Azure TTS V1 (Edge TTS): use [pausa: 2s] ou [silêncio: 1s] para inserir pausas (0.1–10s).",
"Generate Video Keywords": "Gerar palavras-chave com IA",
"Please Enter the Video Subject": "Por favor, insira o Roteiro do Vídeo primeiro",
"Please Enter the Video Subject First": "Insira primeiro o tema do vídeo",
diff --git a/webui/i18n/ru.json b/webui/i18n/ru.json
index a11b87cd..97d49753 100644
--- a/webui/i18n/ru.json
+++ b/webui/i18n/ru.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Выбранные сценарий и ключевые слова применены",
"Auto Detect": "Определить автоматически",
"Video Script": "Сценарий (необязательно)",
- "Video Script Help": "Оставьте поле пустым, чтобы создать сценарий с помощью ИИ по теме видео. Правильная пунктуация помогает создавать субтитры. Используйте [пауза: 2s] или [тишина: 1s] для пауз.",
+ "Video Script Help": "Оставьте поле пустым, чтобы создать сценарий с помощью ИИ по теме видео. Правильная пунктуация помогает создавать субтитры. Поддерживается для Azure TTS V1 (Edge TTS): используйте [пауза: 2s] или [тишина: 1s] для пауз (0.1–10s).",
"Generate Video Keywords": "Создать ключевые слова с ИИ",
"Please Enter the Video Subject": "Сначала введите сценарий видео",
"Please Enter the Video Subject First": "Сначала введите тему видео",
diff --git a/webui/i18n/tr.json b/webui/i18n/tr.json
index 856bd9f9..b5daff94 100644
--- a/webui/i18n/tr.json
+++ b/webui/i18n/tr.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Seçilen senaryo ve anahtar kelimeler uygulandı",
"Auto Detect": "Otomatik Algılama",
"Video Script": "Video Senaryosu (İsteğe Bağlı)",
- "Video Script Help": "Video konusundan AI ile oluşturmak için boş bırakın. Doğru noktalama, altyazı oluşturmayı kolaylaştırır. [pause: 2s] veya [silence: 1s] ile duraklamalar ekleyebilirsiniz.",
+ "Video Script Help": "Video konusundan AI ile oluşturmak için boş bırakın. Doğru noktalama, altyazı oluşturmayı kolaylaştırır. Azure TTS V1 (Edge TTS) ile desteklenir: [pause: 2s] veya [silence: 1s] ile duraklamalar ekleyebilirsiniz (0.1–10s).",
"Generate Video Keywords": "AI ile Anahtar Kelime Oluştur",
"Please Enter the Video Subject": "Lütfen Önce Video Senaryosunu Girin",
"Please Enter the Video Subject First": "Lütfen önce video konusunu girin",
diff --git a/webui/i18n/vi.json b/webui/i18n/vi.json
index ba949d2a..9d4298a4 100644
--- a/webui/i18n/vi.json
+++ b/webui/i18n/vi.json
@@ -48,7 +48,7 @@
"LoomLoom Candidate Applied": "Đã áp dụng kịch bản và từ khóa đã chọn",
"Auto Detect": "Tự Động Phát Hiện",
"Video Script": "Kịch Bản Video (Không Bắt Buộc)",
- "Video Script Help": "Để trống để AI tạo từ chủ đề video. Dấu câu hợp lý giúp tạo phụ đề chính xác hơn. Sử dụng [pause: 2s] hoặc [silence: 1s] để chèn khoảng dừng.",
+ "Video Script Help": "Để trống để AI tạo từ chủ đề video. Dấu câu hợp lý giúp tạo phụ đề chính xác hơn. Hỗ trợ trên Azure TTS V1 (Edge TTS): sử dụng [pause: 2s] hoặc [silence: 1s] để chèn khoảng dừng (0.1–10s).",
"Generate Video Keywords": "Tạo từ khóa bằng AI",
"Please Enter the Video Subject": "Vui lòng Nhập Kịch Bản Video Trước",
"Please Enter the Video Subject First": "Vui lòng nhập chủ đề video trước",
diff --git a/webui/i18n/zh.json b/webui/i18n/zh.json
index db7148af..d789b357 100644
--- a/webui/i18n/zh.json
+++ b/webui/i18n/zh.json
@@ -53,7 +53,7 @@
"LoomLoom Candidate Applied": "已应用选中的文案和关键词",
"Auto Detect": "自动检测",
"Video Script": "视频文案(可选)",
- "Video Script Help": "可留空,由 AI 根据视频主题生成。合理使用标点断句有助于生成字幕。支持使用 [停顿: 2s] 或 [pause: 2s] 插入指定秒数的停顿。",
+ "Video Script Help": "可留空,由 AI 根据视频主题生成。合理使用标点断句有助于生成字幕。仅支持 Azure TTS V1 (Edge TTS):支持使用 [停顿: 2s] 或 [pause: 2s] 插入指定停顿(范围 0.1–10秒)。",
"Generate Video Keywords": "点击使用AI根据**文案**生成视频关键词",
"Please Enter the Video Subject": "请先填写视频文案",
"Please Enter the Video Subject First": "请先填写视频主题",