Skip to content

Commit de0a1cb

Browse files
committed
fix utterance cloner
1 parent 7369f73 commit de0a1cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

InferenceInterfaces/UtteranceCloner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def clone_utterance(self,
150150
self.tts.set_language(lang)
151151
start_sil = numpy.zeros([int(silence_frames_start * 1.5)]) # timestamps are from 16kHz, but now we're using 24000Hz, so upsampling required
152152
end_sil = numpy.zeros([int(silence_frames_end * 1.5)]) # timestamps are from 16kHz, but now we're using 24000Hz, so upsampling required
153-
cloned_speech, sr = self.tts(transcription_of_intonation_reference, view=False, durations=duration, pitch=pitch, energy=energy)
153+
cloned_speech, sr = self.tts(transcription_of_intonation_reference, view=False, durations=duration, pitch=pitch.transpose(0, 1), energy=energy.transpose(0, 1))
154154
cloned_utt = numpy.concatenate([start_sil, cloned_speech, end_sil], axis=0)
155155
if filename_of_result is not None:
156156
sf.write(file=filename_of_result, data=float2pcm(cloned_utt), samplerate=sr, subtype="PCM_16")

0 commit comments

Comments
 (0)