Giter Site home page Giter Site logo

Comments (5)

Is-Jiejie avatar Is-Jiejie commented on July 17, 2024

请问你在windows环境下如何安装的mlx库呀,是在anaconda中安装的吗。我在pycharm中使用python3.8,除了mlx其余库都可以安装,但是mlx始终无法安装

from voice-assistant.

Yeeler avatar Yeeler commented on July 17, 2024

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.

Yeeler avatar Yeeler commented on July 17, 2024

@linyiLYi Is there an alternative lib we can use? I don't have a up-to-date MacOS machine.

from voice-assistant.

owlsan49 avatar owlsan49 commented on July 17, 2024

mlx是mac专用的机器学习库,windows版得改代码

from voice-assistant.

onedollor avatar onedollor commented on July 17, 2024

可以考虑用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)

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.