freeswitch-chatGPT实现最强智能电话客服

结合我们之前分享的经验,如何打造一个智能的AI电话客服。

1:搭建sip通信环境,我们常用开源freeswitch。 最简单方式,使用docker环境进行部署。

GitHub - laoyin/freeswitch_docker_file
Contribute to laoyin/freeswitch_docker_file development by creating an account on GitHub.

git clone https://github.com/laoyin/freeswitch_docker_file.git

docker build -t fs:v1.2  .


docker run -itd --net=host fs:v1.2 /bin/bash

2: 搭建完成sip之后,处理对应语音的asr

你可以使用多种方式

a、mrcp :

freeswitch_chatGPT/src at main · laoyin/freeswitch_chatGPT
Using ChatGPT to connect with FreeSWITCH, creating an intelligent phone robot. - freeswitch_chatGPT/src at main · laoyin/freeswitch_chatGPT

b、freeswitch 2次开发 media bug:

知乎上搜有关于freeswitch-media bug相关

3:连接openai-chatGPT

freeswitch_chatGPT/src/open_ai at main · laoyin/freeswitch_chatGPT
Using ChatGPT to connect with FreeSWITCH, creating an intelligent phone robot. - freeswitch_chatGPT/src/open_ai at main · laoyin/freeswitch_chatGPT

使用openai接口,处理文本返回。

4:对接tts服务。

因为chatGPT返回速度,要求我们必须要从工程方面优化tts效果,使用stream方式,用最简单分隔符来拼接文本。

赶紧去体验吧。