update format for anki,

upgrade trasnlation package search,
fix small bugs
This commit is contained in:
Wolfang Torres
2026-06-12 00:43:55 +08:00
parent 21c6416cfd
commit eb4cc8e6e0
10 changed files with 70 additions and 45 deletions

View File

@@ -20,7 +20,7 @@ def translator_process(
results = []
for n, line in enumerate(text_lines):
line = line.strip()
audio_path = process_file.resources / f"N{n::03.0n}.wav"
audio_path = process_file.resources / f"N{n:03n}.wav"
if not audio_path.exists():
audio = TTS.MODEL.generate(f"{line}", language_id=LANGUAGES.CN)
torchaudio.save(audio_path, audio, TTS.MODEL.sr)