File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ def _convert_text_to_speech(
55
55
)
56
56
inputs = tokenizer (text , return_tensors = "pt" ).to (self .device )
57
57
58
+ _type = inputs ["input_ids" ].dtype
59
+
60
+ if _type != torch .int64 :
61
+ logger ().error (
62
+ f"text_to_speech.client.synthesize_speech: Fixing type '{ _type } ' to 'long' for text '{ text } '"
63
+ )
64
+ inputs ["input_ids" ] = inputs ["input_ids" ].long ()
65
+
58
66
# Generate waveform
59
67
with torch .no_grad ():
60
68
output = model (** inputs ).waveform
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ branch_name=$(git rev-parse --abbrev-ref HEAD)
7
7
declare -a target_languages=(" cat" ) # Catalan (cat) and French (fra)
8
8
declare -a inputs=($( find ../dubbing/od-videos/ -type f -name " *.mp4" ) )
9
9
declare -a inputs=(" videos/jordi.mp4" )
10
+ declare -a inputs=(" ../dubbing/od-videos/english/openuniversity.mp4" )
10
11
11
12
for input_file in " ${inputs[@]} " ; do
12
13
output_directory=" output/$( basename " ${input_file% .* } " ) .${branch_name} /"
@@ -21,9 +22,7 @@ for input_file in "${inputs[@]}"; do
21
22
--target_language=" $language " \
22
23
--translator=" apertium" \
23
24
--apertium_server=http://localhost:8500/ \
24
- --tts=api \
25
- --tts_api_server=http://localhost:8100/ \
26
- --target_language_region=" central" \
25
+ --tts=mms \
27
26
--device=cpu \
28
27
--dubbed_subtitles\
29
28
--log_level=INFO
You can’t perform that action at this time.
0 commit comments