Talk to ChatGPT from your phone in 310 lines of Go code. 用310行Go代码写一个完整的ChatGPT语音聊天程序。
- XSwitch, Community version is free and enough to run this demo.
- One of AI Modules, e.g. mod_ali or mod_baidu, included in XSwitch.
- XCC API with a NATS Server.
- XCtrl.
If you don't need a web admin you can try XSwitch without XUI or use xswitch-free as an alternative.
Alternatively, You can use opensource FreeSWITCH with ESL and one of ASR/TTS modules like mod_unimrcp.
make
make run
or
go run chatgpt.go
Pull Requests is welcome but the main purpose of this demo is to keep it simple and easy to understand, and strictly limited in "310 lines of code".
There's some videos on Wechat: https://mp.weixin.qq.com/s/cdlkDu3WH6I5X9YWJxG7vA .
This Readme is not complete, come back and check updates if you need more details. A Chinese version will also be available soon.