New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[server] add streaming tts demos #1771
Conversation
|
||
if audio_path.endswith("pcm"): | ||
with open(audio_path, "wb") as f: | ||
f.write(bubytes_dataffer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bubytes_dataffer 这是什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改了
@@ -117,3 +122,221 @@ async def run(self, wavfile_path: str): | |||
logger.info("final receive msg={}".format(msg)) | |||
result = msg | |||
return result | |||
|
|||
|
|||
class TTSWsHandler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyaudio.PyAudio()部分可以抽象成基类
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在弄有点来不及,后续弄吧
# others | ||
lang: 'zh' | ||
device: 'cpu' # set 'gpu:id' or 'cpu' | ||
am_block: 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
默认最小pad在 pretrained_model dict中给出。
PR types
New features
PR changes
add streaming tts cli
add streaming tts demos
update readme
Describe
speech server