We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca10190 commit 7021228Copy full SHA for 7021228
open_dubbing/text_to_speech_mms.py
@@ -55,10 +55,11 @@ def _convert_text_to_speech(
55
)
56
inputs = tokenizer(text, return_tensors="pt").to(self.device)
57
58
- # Model returns for some sequence of text no result
+ # Model returns for some sequences of tokens no result
59
if inputs["input_ids"].shape[1] == 0:
60
sampling_rate = 16000
61
duration_seconds = 1
62
+ # If we fill the array with (np.zeros) the ffmpeg process later fails
63
output_np = np.ones(sampling_rate * duration_seconds, dtype=np.int16)
64
logger().warning(
65
f"TextToSpeechMMS._convert_text_to_speech. Model returns input tokens for text '{text}', generating an empty WAV file."
0 commit comments