DIY一個智能音箱
十一假期里將藍牙音箱改造成一個智能音箱, 參考了網(wǎng)上的實現(xiàn)方法, 后臺的大語言模型使用的是百度的文心一言.
賬號
- Picovoice 喚醒詞服務(wù) https://console.picovoice.ai/
我綁定了github賬號.
訪問https://picovoice.ai/,注冊賬號,然后進入控制臺, 目前不支持中文喚醒詞, 設(shè)置喚醒詞后, 然后選擇Windows操作系統(tǒng),就能下載了,下載后的壓縮包要解壓,才能得到.ppn文件.
Picovoice 提供了python SDK包 pvporcupine, 在程序中可使用該sdk通過對比.ppn內(nèi)容來識別喚醒詞. - 百度智能云-語音類: https://console.bce.baidu.com/ai
實現(xiàn)語音轉(zhuǎn)文本服務(wù), 使用之前需要在console中新增一個應(yīng)用.
百度也提供喚醒詞服務(wù), 但不支持windows, 所以我使用了 PicoVoice. - 百度智能云-大語言模型類: https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application
提供大語言模型問答功能, 使用之前需要在console中新增應(yīng)用, 并選擇一個大語言模型類型, 我使用的是 ERNIE-Bot-turbo 模型, token較為便宜. - edge-tts: 實現(xiàn)文本轉(zhuǎn)語音服務(wù)
不同于微軟和百度的TTS, 這個庫不需要賬號
教程
Picovoice離線語音識別在Linux系統(tǒng)的部署
http://www.rzrgm.cn/darren-channel/p/14860973.html
文心一言教程:
https://zhuanlan.zhihu.com/p/656681903
https://zhuanlan.zhihu.com/p/641298242
edge-tts:
https://zhuanlan.zhihu.com/p/619612276
百度千帆大模型平臺測試
對話url:
千帆大模型平臺集成了業(yè)界多個大語言模型, 下面是三個大語言模型的url.
wenxinworkshop/chat/completions -- 文心一言模型
wenxinworkshop/chat/eb-instant -- ERNIE-Bot-turbo模型, token較為便宜
wenxinworkshop/chat/llama_2_7b -- llama_2_7b模型
api官方文檔: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/4lilb2lpf
POST 測試:
POST https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant?access_token=24xxxxxx"
content-type: application/json
{
"temperature": 0.9,
"messages": [
{
"role": "user",
"content": "假設(shè)你是個智能伙伴,名字叫牛頓, 英文名為Newton, 你是一位百科全書式的人物, 你的回答需要非常簡潔. 我的問題是:四大名著?"
}
]
}
源碼參考
https://github.com/MedalCollector/Orator
https://github.com/FlickerMi/hello-chatgpt/blob/main/requirements.txt
https://notemi.cn/integrate-voice-services-to-achieve-voice-conversations-with-chatgpt.html
https://github.com/wzpan/wukong-robot
https://github.com/phodal/awesome-smart-speaker
深度文章
Keyword Spotting 語音喚醒技術(shù)
https://vaisramana.github.io/2019/08/03/keyword-spotting-語音喚醒技術(shù).html
ChatGPT應(yīng)用
https://wqw547243068.github.io/chatgpt_application
大語言模型沉思錄 Deep Think in LLM
https://wqw547243068.github.io/llm
GPT-4要來了,一文看盡大型語言模型的過去現(xiàn)在未來
https://www.thepaper.cn/newsDetail_forward_22275233

浙公網(wǎng)安備 33010602011771號