Coder Social home page Coder Social logo

nerdaxic / glados-voice-assistant Goto Github PK

View Code? Open in Web Editor NEW
274.0 274.0 23.0 75.16 MB

DIY Voice Assistant based on the GLaDOS character from Portal video game series. Works with home assistant!

Home Page: https://www.henrirantanen.fi/2022/02/10/glados-voice-assistant-with-custom-text-to-speech/?utm_source=github.com&utm_medium=social&utm_campaign=post&utm_content=DIY+GLaDOS+Voice+Assistant+with+Python+and+Raspberry+Pi

License: Other

Python 10.53% C 87.49% C++ 1.57% Shell 0.41%
glados glados-tts home-assistant home-automation tts voice-assistant

glados-voice-assistant's People

Contributors

eternalliving avatar nerdaxic avatar salleq 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

glados-voice-assistant's Issues

Glados error I think.

First when I try to run it has an error about not finding user nerdaxic so instead of changing the code I just added a new user.
But when i try to run it.....
`~/glados-voice-assistant$ python3 glados.py
INFO: Initializing TTS Engine...
[W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware.
INFO: Home Assistant not linked.
INFO: Starting notification API...

GLaDOS: Oh, its you
GLaDOS: Its been a long time
GLaDOS: How have you been

Waiting for keyphrase: Hey alexa
INFO: Initializing TTS Engine...
[W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware.

  • Serving Flask app 'gladosNotifyAPI' (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5000
  • Running on http://192.168.100.150:5000
    Press CTRL+C to quit

`
I don't know what I'm doing wrong but I need help

Sometimes GLaDOS retriggers after speaking

This doesn't happen all the time but often enough that I've noticed:
I trigger GLaDOS, say the command, she speaks back and immediately triggers herself.

Right now I'm doing this on a laptop microphone and speakers so it could be that she triggers herself from her previous output, but it's not consistent even when saying the same command.
It's like sometimes it jumps directly from "waiting for trigger" to actually listening to what I have to say, but it fails immediately and I get the "you really need to write better code" error.

Local TTS Engine Requirements

Are there undocumented requirements to use the new local glados-tts? I have tried directly cloning and running and against this project with a clean Ubuntu install and walking through every dependency installed without success. Right now on clean install, installing everything listed and running I get:

Initializing TTS Engine...
Traceback (most recent call last):
  File "glados.py", line 22, in <module>
    glados = torch.jit.load('models/glados.pt')
  File "/usr/local/lib/python3.8/dist-packages/torch/jit/_serialization.py", line 161, in load
    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
RuntimeError: Unknown qengine

Trying to try the TTS and it has an error

user@userPC:~/glados-voice-assistant/glados_tts$ sudo python3 glados.py Initializing TTS Engine... [W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware. Input: The odd ones out Forward Tacotron took 919.8753833770752ms HiFiGAN took 4246.425151824951ms ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave aplay: main:852: audio open error: No such file or directory

Whats going on.. Please help.

Respeaker setting not honored

In glados_respeaker.py:

	if "name 'pixel_ring' is not defined" in str(e):
		print("\nERROR: ReSpeaker is probably not connected?")
		#if(os.getenv('RESPEAKER_CONNECTED')):
		#	exit();

If I uncomment the two lines that I have commented above, I get the error "ReSpeaker is probably not connected" even though in settings.env there is:
RESPEAKER_CONNECTED = False

matrix daugther boards

Hi,
I have a matrix creator and would like to give a try with my board but I guess I have to change lot of code.

have our consider to use the matrix products instead of the respeaker?.

they include rgb leds ring and more sensors and leave the raspberry pinout accesible fo the eye lcd(even they include and extra atmel micro controller for development).

ModuleNotFoundError: No module named 'phonemizer'

I am running Ubuntu on windows using wsl2 I think it's called?
I have looked in the file it is specifying and it is right, there is no phonemizer.py file in my download. Did I miss downloading something? Where is phonemizer.py?
image

RuntimeError: espeak not installed on your system

Using Windows
Running Python 3.9.7
I have both the old espeak and espeak NG installed

I tried to install just the tts package itself, I managed to install everything, but it does not seem to find espeak, no matter what I try.
I have set up the environment variables as others have mentioned in their issues #22 and bootphon/phonemizer#44
(I think I assume corectly I have to set it up with the Windows Environment Variables)

But the result is the same. It fails in line 67 of utils\cleaners.py which then points to phonemizer failing. Specifically espeak\espeak.py (line 45 super().init ) and espeak\base.py (line 35 super().init)

I haven't really messed with espeak and phonemizer before, so I am unsure if I am failing something obvious, or if there is an issue with some code. Most likely me failing.

I cant Run line 3/2

Can't run
cp ~/glados-voice-assistant/settings.env.sample ~/glados-voice-assistant/settings.env && nano ~/glados-voice-assistant/settings.env
Need help

im a dumb shit lol plz help

hi all I'm making a glados robot for my son and I'm just learning python and every thing so im a little slow lol
im just trying to get the voice to work on a laptop. i thot i installed all the python parts right i even did the yaml but when i launch it in command prompt i get the error........ settings/glados_settings.yaml file not found can any 1 tell me what im doing wrong

Alternative Mic Settings

So, because I don't have a ReSpeaker and am just using a webcam microphone for input, I've had to alter a bit of code. I'm not sure if it's worth integrating into the code for others, but thought I would at least put my fix here. Maybe there is a better place for it?

in the glados.py file, simply specifying the device it needs to be listening to: audio_device='plughw:2,0'
speech = LiveSpeech(audio_device='plughw:2,0', lm=False, keyphrase=glados_settings.settings["assistant"]["trigger_word"], kws_threshold=1e-20)

I wasn't sure how to specify which device with pulse, and so had to alter the sphinxbase init.py file to load alsa instead:

elif sys.platform.startswith('linux'):
    *** REMOVED TRY EXCEPT BLOCK WITH .ad_pulse ***
    from .ad_alsa import *

My only problem now is that it doesn't sense the keyword very well....or at all.... maybe recording volume problems. I'll have to play with pocketsphinx to see if I can get it to work better. I guess it's time I invest in a ReSpeaker!

GLaDOS' Voice

Hey, I love your project and am working on turning my pi into GLaDOS.... just not as elegantly as you have. I love the cleanness of your code, however feel like the voice is a little off. I found uberduck.ai which has a voice generator for GLaDOS as well as an API. I've managed to get a working script, its fairly quick and the voice is well balanced. I'm not sure how to contribute yet as I'm still pretty new to git but would love to help if your interested.

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.