Coder Social home page Coder Social logo

voice-chat-ai's Introduction

主要功能

  1. 使用Picovoice实现了语音唤醒
  2. 使用阿里云的NLS实现语音识别与合成
  3. 支持ChatGPT持续对话以及函数调用(当前已支持查询实时天气和时间)

配置&启动

# 创建虚拟环境
python3 -m venv .venv
# 激活虚拟环境
source .venv/bin/activate
# 安装依赖
pip install requests pvporcupine SpeechRecognition pvrecorder

# 下面2个依赖库需要先安装对应的开发库,否则会报错。不同的系统安装命令不一样,也可以将错误直接发给chatGPT解决
# MacOS:brew install portaudio
# Linux:apt-get install python3-dev libasound2-dev portaudio19-dev
pip install simpleaudio pyaudio

# 修改各种Key和配置项
vim config.py
# 启动
python3 main.py

第三方平台账号注册

一、Picovoice 唤醒词

官网:https://picovoice.ai/

不建议使用QQ邮箱注册,容易被封号

console-picovoice-ai

二、阿里云 语音识别与合成

官网:https://ai.aliyun.com/nls

  1. 先创建一个语音识别项目,得到AppKey console-nls
  2. 再创建一个RAM账号,得到AK/SK。该账号主要作用是用于自动获得授权Token。该RAM账号只需使用以下最小权限
{
    "Version": "1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "nls:CreateToken",
            "Resource": "*"
        }
    ]
}

三、高德 IP定位、天气查询

官网:https://lbs.amap.com/ console-amap

参考项目

https://github.com/MedalCollector/Orator

voice-chat-ai's People

Contributors

xseruer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.