FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
5.65k stars 595 forks source link

更新最新的代码和模型后,老的调用方法报错'generator' object is not subscriptable #492

Open hjj-lmx opened 4 days ago

hjj-lmx commented 4 days ago

'generator' object is not subscriptable

prompt_audio = (prompt_speech.numpy() * (2 ** 15)).astype(np.int16).tobytes()
prompt_speech_16k = torch.from_numpy(np.array(np.frombuffer(prompt_audio, dtype=np.int16))).unsqueeze(dim=0)
prompt_speech_16k = prompt_speech_16k.float() / (2 ** 15)
output = clone_model.inference_cross_lingual(f'<|{lang}|>{doubao_content}', prompt_speech_16k, True)
aluminumbox commented 3 days ago

看readme,用新的方法

hjj-lmx commented 3 days ago

看readme,用新的方法

新的方法没有看到怎么返回流