Skip to content
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

Auto TTS #1031

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Auto TTS #1031

wants to merge 5 commits into from

Conversation

JasonGrass
Copy link

@JasonGrass JasonGrass commented Nov 14, 2023

功能:

AI 在返回回答时,自动触发调用 TTS 接口,朗读生成的文本内容

特点:

无需等待 AI 内容生成完成,会提前朗读已经生成的句子。(可以调节断句频率)

需求场景与灵感来源:

Tony Dinh 🎯 on X: "Playing game with GPT-4: 🕶️ This is an experiment to talk with AI in real-time (the AI will start talking back to you immediately without waiting for GPT-4 to finish generating) Drop a like ❤️ and I'll deploy it later today for you to try it yourself! 🥰 https://t.co/DiuyRGhwa4" / X

我在本地测试 chatbox 时,输入使用语音输入(现在很多输入法自带),然后将 AI 生成的回答进行 TTS,实现了语音实时沟通的效果。目前输入完成还需要手动按 Enter,也可以考虑直接提交的方式(一段时间没有输入之后,自动提交)。

TODO:

1 默认调用 elevenlabs 的 API,没有支持其它 API
2 没有完成设置 UI (设置 API key 或 voiceId)
3 生成错误没有界面 UI 提示
4 没有启用或禁用此功能的 UI

其它

提交 PR 时,发现 #336 已经实现了类似的功能,超棒。
这个 PR 是我本地测试之后的成果,用得着的话,就收下吧~ 😋

@syheliel
Copy link

LGTM, quite handy functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants