Comments (5)
请问你在windows环境下如何安装的mlx库呀,是在anaconda中安装的吗。我在pycharm中使用python3.8,除了mlx其余库都可以安装,但是mlx始终无法安装
from voice-assistant.
To install from PyPI you must meet the following requirements:
- Using an M series chip (Apple silicon)
- Using a native Python >= 3.8
- macOS >= 13.3
MLX is only available on devices running macOS >= 13.3 It is highly recommended to use macOS 14 (Sonoma)
https://ml-explore.github.io/mlx/build/html/install.html
from voice-assistant.
@linyiLYi Is there an alternative lib we can use? I don't have a up-to-date MacOS machine.
from voice-assistant.
mlx是mac专用的机器学习库,windows版得改代码
from voice-assistant.
可以考虑用openai的whisper替换掉whisper目录.
几行code改动,还有貌似torch在cuda 12.4上还有问题,只好用nightly的.
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
torch-2.4.0.dev20240416%2Bcu121-cp39-cp39-win_amd64.whl
tensor([0.], device='cuda:0')
True
还需要ffmpeg,安装可以按照ffmpeg
whisper_model = whisper.load_model("large", download_root=f"{MODEL_ROOT}/openai/whisper")
user_input = whisper_model.transcribe("recordings/output.wav")["text"]
C:\Python\Python39\python.exe I:/AI/code/voice-assistant-main/main.py
torch.cuda.is_available()=>True torch.zeros(1).cuda()=>tensor([0.], device='cuda:0')
好测试再一次测试
Listening...
Error in text-to-speech: [WinError 2] The system cannot find the file specified
speech 部分用以下替换(仅仅用于测试,不连贯,也听起来很傻)
from gtts import gTTS
from pygame import mixer
mixer.init()
import tempfile
except Exception as e:
print(f"Error in text-to-speech: {e}")
self.speak(text, lang="zh-cn")
def speak(self, text, lang):
with tempfile.NamedTemporaryFile(delete=True) as fp:
tts = gTTS(text=text, lang=lang)
tts.save('{}.mp3'.format(fp.name))
mixer.music.load('{}.mp3'.format(fp.name))
mixer.music.play(1)
from voice-assistant.
Related Issues (15)
- README.md Yi-6B-Chat-GGUF link doesn't seem to be the chat version HOT 1
- 加载模型的时候出现报错 HOT 2
- 【开源工具推荐】RainbowGPT AI Agent ,免费GPT API 提供 !!实时接口股票数据分析预测、本地无上限字数知识库搜索问答、Google搜索引擎问答
- 模型找不到 HOT 3
- 可否对语音输出加入vits模型的支持 HOT 1
- Couldn't load model HOT 4
- #开一个小白讨论帖,小白们集合呀! HOT 20
- 优化一些细节 HOT 2
- 运行后终端显示Listening...但是我说话,它没有反应 HOT 1
- 语音识别失败, On-device recognition is not supported for locale HOT 2
- 不执行
- how to use it? 怎么用啊大佬们
- 搞不定啊,纯新手,求大佬的指导视频。
- 不是很懂为什么会上trending HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voice-assistant.