Skip to content

Commit 7021228

Browse files
committed
comments
1 parent ca10190 commit 7021228

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

open_dubbing/text_to_speech_mms.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ def _convert_text_to_speech(
5555
)
5656
inputs = tokenizer(text, return_tensors="pt").to(self.device)
5757

58-
# Model returns for some sequence of text no result
58+
# Model returns for some sequences of tokens no result
5959
if inputs["input_ids"].shape[1] == 0:
6060
sampling_rate = 16000
6161
duration_seconds = 1
62+
# If we fill the array with (np.zeros) the ffmpeg process later fails
6263
output_np = np.ones(sampling_rate * duration_seconds, dtype=np.int16)
6364
logger().warning(
6465
f"TextToSpeechMMS._convert_text_to_speech. Model returns input tokens for text '{text}', generating an empty WAV file."

0 commit comments

Comments
 (0)