mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
[to #41669377] fix pipeline output wav is 32-bit float expect 16-bit int
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11765670
This commit is contained in:
@@ -218,5 +218,6 @@ class SambertHifigan(Model):
|
||||
for line in texts:
|
||||
line = line.strip().split('\t')
|
||||
audio = self.__synthesis_one_sentences(voice, line[1])
|
||||
audio_total = np.append(audio_total, audio, axis=0)
|
||||
audio = 32768.0 * audio
|
||||
audio_total = np.append(audio_total, audio.astype('int16'), axis=0)
|
||||
return ndarray_pcm_to_wav(self.__sample_rate, audio_total)
|
||||
|
||||
Reference in New Issue
Block a user