Giter Site home page Giter Site logo

voice-assistant's People

Contributors

artus-lytiq avatar crackerben99 avatar eltociear avatar linyilyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

voice-assistant's Issues

模型找不到

模型放在脚本同级的models文件夹里了,为什么脚本报错找不到模型呢。。。

优化一些细节

这个工程很棒,我优化了其中的一些细节。

  1. 加入了回车跳过当前对话的功能;
  2. 保存已经产生的对话到log.txt。

这是改动后的main.py文件,这个改动还需要pynput包以及在初次使用时在mac里按提示打开相应的权限。
main.txt

【开源工具推荐】RainbowGPT AI Agent ,免费GPT API 提供 !!实时接口股票数据分析预测、本地无上限字数知识库搜索问答、Google搜索引擎问答

推荐项目
📈RainbowGPT现在包括一个强大的股票分析模块,集成各种技术,提供对股市的全面见解。
⚡RainbowGPT结合了AI Agent代理、GPT-4、GPT3.5、ChatGlm3、Qwen LLM、ChromaDB矢量数据库、Langchain知识库问答检索和谷歌搜索引擎。

项目地址: RainbowGPT 彩虹GPT

类别:Python

项目描述:
🔄 知识库 QA 搜索最有效的使用是将稀疏检索器(例如 BM25)与密集检索器(例如嵌入相似性)相结合。这种“混合搜索”最佳地利用了两种检索器的互补优势来获取全面的知识。
📊 探索股票分析模块并为您的投资决策解锁宝贵的见解! 🚀 #StockAnalysis #RainbowGPT #AIInvesting

🌐 免费使用GPT API
我们致力于根据使用情况扩展容量,并在未经官方批准的情况下免费提供 API。如果您觉得这个项目有帮助,请考虑给我们一个⭐。
该API Key用于转发API请求。将 Host 更改为 api.chatanywhere.com.cn (国内使用首选)或 api.chatanywhere.cn (国际使用,国内用户需要全球代理)。

截图:
exp1
SQL_Agent
stock1

运行后终端显示Listening...但是我说话,它没有反应

首先喜欢林亦的视频

遇到的问题:运行main.py后,显示Listening...但是我说话,它没有反应

已进行如下操作:

  1. git clone项目到本地后(M1 max 32G MAC),conda了一个虚拟环境

  2. 新建了models文件夹,文件夹里放了yi-chat-6b.Q8_0.gguf 和 新建的whisper-large-v3文件夹,whisper-large-v3文件夹里放了下载下来的config.json和weights.npz

  3. 修改load_models.py 里 model_path = "/Users/mymac/voice-assistant/models/whisper-large-v3"

---希望有朋友可以解答疑惑,谢谢

Couldn't load model

Traceback (most recent call last):
  File "/Users/xxx/Project/voice-assistant/main.py", line 155, in <module>
    llm = LlamaCpp(
          ^^^^^^^^^
  File "/Users/xxx/miniconda/envs/VoiceAI/lib/python3.11/site-packages/langchain_core/load/serializable.py", line 97, in __init__
    super().__init__(**kwargs)
  File "/Users/xxx/miniconda/envs/VoiceAI/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for LlamaCpp
__root__
  Could not load Llama model from path: /Users/xxx/Project/voice-assistant/yi-chat-6B-GGUF/yi-chat-6b.Q8_0.gguf. Received error  (type=value_error)

System envrioment:

uname -a
Darwin ady.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 x86_64

加载模型的时候出现报错

在加载模型的时候出现下面的报错有没有大佬也遇到过😭
Could not load Llama model from path: yi-chat-6b.Q2_K.gguf. Received error (type=value_error)

不执行

请问为什么停在llm(prompt.format(question=question), max_tokens=500)就不执行了呢

#开一个小白讨论帖,小白们集合呀!

开一个小白讨论帖,欢迎大家讨论,祝大家早日拥有自己的ai派蒙

事情是这样的,我在b站看到这个项目,十分感兴趣。但作为一个小白,题主所写对我来说十分笼统,在尝试两天后我任然无法解决其中的bug。看到有许多小白和我一样不知所措,为此我打算分享我目前得到的成果,以供大家讨论并应对具体的事项。

系统:mac 13.4和14.2,我在调试过程中还升级了一次lol
芯片:m1芯片,21年机型

首先,你需要下载anaconda和brew,

anaconda链接在此:

https://www.anaconda.com

12.16更新:anaconda在删除后让我成功避免了一些错误,因此下载miniconda是推荐的

https://docs.conda.io/projects/miniconda/en/latest/
截屏2023-12-14 19 47 46

brew选择国内源下载

  /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

然后打开题主下载代码中的readme文件在终端中输入前两行代码

遇到弹出填y,这主要是建立一个虚拟环境,之后你会发现你前面的括号内容发生变化了

截屏2023-12-14 20 06 10

打开anaconda,在环境中找到voice ai,以后就不用再配置环境了,在这里启动终端就可以💗

截屏2023-12-14 20 29 53

接着,通过路径打开你下载的文件夹

  如 cd ~/desktop/program/voice-assistant-main(文件路径)

这里cd是打开文件夹的命令,打开后这一点要是没弄清楚,小白很容易在后一步卡住。我是图省事就放桌面了,同时hear和models我也放在voice-assistant-main中,这也可能导致我之后的错误。

执行pip install -r requirements.txt

要是出现pip命令找不到就尝试pip3

这一步最容易出现的错误是mlx下载错误,我查mlx下载手册(https://ml-explore.github.io/mlx/build/html/install.html)显示使用pip install mlx 需要用native Python >= 3.8,MacOS >= 13.3,但这个环境python = 3.11,就找不到资源。

截屏2023-12-14 20 20 52

但我按照mlx文档所说的步骤构建native环境,发现torch不支持这个平台,也会报错所以进退两难了。

截屏2023-12-14 21 10 44

我的做法是打开requirements.txt,删除mlx,尝试通过源码导入,但也失败了,这个我们之后再说。

执行 CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python

这一点我基本不会报错,等一会就好了。

下载portaudio和pyaudio

brew install portaudio
pip install pyaudio

复制代码输入就好,这里我也不会报错错。

下载gguf和hear

这里我找到了镜像源

https://hf-mirror.com/01-ai/Yi-34B-Chat

有多种gguf能够下载,我下载的是这个

https://hf-mirror.com/TheBloke/Yi-34B-GGUF/blob/main/yi-34b.Q4_K_M.gguf

下载完毕后,我放到voice-assistant-main中建立的models文件(这是我新建的文件夹)

截屏2023-12-14 20 41 42

同时按照题主描述下载hear并执行sudo bash install.sh,这大概是我最先成功的事情。

运行程序

重头戏来了,如果你前面msl没有报错,那你是比我幸运得多的幸运儿,恭喜你可以运行程序了(大概?)
注意看你是否还在voice-assistant-main,如果没在则用cd折跃;如果在的话,执行python main.py(这是我在题主视频里看到的)

截屏2023-12-14 20 42 46

若你得到以上输出,那么我也无能为力,因为我也止步于此!如果你能运行,那么恭喜你,也欢迎你向我分享你的喜悦与运行方法。
这个问题的描述是这样的,主要与pyaudio有关
image

主要是在执行导入pyaudio时执行__init__.py第111行出错输出的,我重复了很多遍还是无法解决
以下是我找到的试图解决这个问题的方法,但都对我无效,希望能祝你度此难关。

image

https://blog.csdn.net/qq_41185868/article/details/107056843
https://blog.csdn.net/u012965373/article/details/131407998
https://zhuanlan.zhihu.com/p/269415073

所以我希望大家一起讨论,看看能不能解决这个问题,如果是bug的话就只能等更新了,不发出来我心痒痒。

这是我第一次写issue,我也才接触github两天,其中肯定有许多错误。若果有什么错误或者遗漏,也请经快与我讨论。
写到最后才发现题主是我校友[捂脸],献丑了…… 也希望题主能够早日更新,早日实现“让大家分分钟拥有自己的ai语音助手”的承诺。

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.