Giter Site home page Giter Site logo

linuer / voice-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linyilyi/voice-assistant

0.0 0.0 0.0 12 KB

一个简单的 Python 脚本,可以通过语音与本地大语言模型进行对话。

License: Apache License 2.0

Python 100.00%

voice-assistant's Introduction

语音助手

一个简单的 Python 脚本,可以通过语音与本地大语言模型进行对话。

macOS 安装指南

以下为 macOS 的安装过程,Windows 与 Linux 可以使用 speech_recognition 与 pyttsx3 来替代下文中的 macOS 的 hear 与 say 指令。

创建环境

conda create -n VoiceAI python=3.11
conda activate VoiceAI
pip install langchain
CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install llama-cpp-python

# 安装音频处理工具
brew install portaudio
pip install pyaudio

hear 语音识别模块

使用 hear 指令可以直接调用 macOS 的语音识别模块。注意要开启电脑设置里的键盘听写选项:设置 -> 键盘 -> 听写(开启开关)。

模型文件

模型文件存放于 models/ 文件夹下,在脚本中通过变量 MODEL_PATH 指定。 推荐下载 TheBloke 的 gguf 格式模型:

voice-assistant's People

Contributors

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