Coder Social home page Coder Social logo

hadesjaky / horn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qurel/chatgptvoice

0.0 0.0 0.0 176 KB

A desktop application for real-time voice chat with GPT, assisting in multilingual scenario conversations and improving your spoken language skills. Powered by Whisper. 基于Qt开发的本地实时gpt语音聊天工具,进行模拟场景对话,支持多语音,帮助锻炼口语

License: Mozilla Public License 2.0

Python 78.45% CSS 21.55%

horn's Introduction

horn

基于whisper和PyQT(PySide6)的实时GPT聊天工具,支持历史会话

效果演示:

滑稽的中文效果:

环境需求

python >= 3.10

操作系统

win10

本人环境,可行

Linux

未测试过Linux desktop环境下的表现,理论可行,tts相关可能需要注意,参照 https://github.com/nateshmbhat/pyttsx3#installation-

Mac

参照Linux,理论可行。

显卡

运行whisper base model所需显存在1G以下,效果尚可,无杂音、口语准确的情况下准确率能在90%。whisper的large model占用显存在8G以上,但是效果非常好,我这糟糕的英语口语都能基本识别对,而且对长语音、断断续续的也有很棒的处理效果。

总体来说,base model比较亲民,但是有条件尽量上large model。对于识别错误的情况,可以在GUI直接修改识别结果。

安装

克隆项目

git clone https://github.com/QureL/horn.git
cd horn

创建并激活虚拟环境(powershell)

mkdir venv
python -m venv .\venv\
.\venv\Scripts\Activate.ps1

安装依赖

pip install -r requirements.txt

运行

在虚拟环境中直接执行

python ./main.py

whisper远程执行

本人有一台12G显存的Linux主机,一台孱弱的1650笔记本,为了能跑whisper large model,可以考虑whisper放在Linux上,客户端和whisper使用ws通信:

Linux上:

python scrpit/whisper_server.py --model large-v2

客户端:

python .\main.py --whisper_mode remote --whisper_address ws://{你的Linux IP}:3001

启用代理

python .\main.py --proxy http://127.0.0.1:10809

启用代理后openai gpt请求、模型下载流量均会经过代理节点

TODO LIST

  • 国际化支持
  • 聊天ui优化
  • 导入其他TTS
  • 消息编辑
  • 本地langchain向量库

horn's People

Contributors

qurel 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.