New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the mobile speech to MQTT to speech device #809

Closed
goatchurchprime opened this Issue May 23, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@goatchurchprime
Contributor

goatchurchprime commented May 23, 2018

Referring to #616 and #803, the product design is simple:

Set of headphones with a mic that interprets what is spoken into a MQTT message (under the topic vocopi/spoken) and which plays the words and phrases that are published under the topic vocopi/tohear (with tones or different voices to distinguish which device said it).

This means all such voice commands and responses can be implemented in a distributed manner using low power (eg ESP) devices on the MQTT system.

Currently the code which does this is here: https://github.com/goatchurchprime/vocopi loaded onto a pi that is based on the google-aiy project: https://www.raspberrypi.org/blog/google-aiy-projects-2/

(Possibly this could be implemented as an android app that converted back and forth using the google voice services.)

Ideally we should look at deploying an open source locally implemented system, like this one:
https://hacks.mozilla.org/2017/11/a-journey-to-10-word-error-rate/

@goatchurchprime

This comment has been minimized.

Contributor

goatchurchprime commented Oct 13, 2018

The MQTT to voice device is now working. The code (which runs under sysctl) is here:
https://github.com/goatchurchprime/vocopi/blob/master/mqtt2voice.py#L43

You can make it speak like this:

mosquitto_pub -h mqtt.local -t "vocopi/tohear" -m "The MQTT, to, speech raspberry pi is now working"

Also, there is a node-red injection button on the dashboard on the big screen that can make it say things too.

Your job is to wire up the blue button on the node-red to say something.

Technical problems that need fixing:

  1. Power There's not enough power on the USB power lead to run the amp, so the rpi keeps rebooting if you draw power off it. I'm using a duff ESP32 to give the 5V on a separate circuit. We need to do this. It would be better if there was only one lead powering this thing (including the amp) reliably. How does Adrian manage with museum in a box?

  2. networking Wifi would be preferable as it would make this thing more portable.

  3. Blip noises I can't get my blips noises to work. These are a good way to demark the start and end of the phrases. We do have 4 different voices in the flite software, I've hard coded the female slt for now as the other voices sound less good quality.

  4. LED flashing It's probably essential that we get some LEDs to flash when it is speaking to replace the feedback you get when a person speaks of their lips moving. They do it in the movies for a reason.

  5. Applications Need some uses. eg "Coffee is ready", "It's 12 o'clock", "The laser cutter is going off" (in fact any automation could be also confirmed/signaled with a voice), "The fresh water is ready", "The sun is about to set" <-- derive this from a formula based on our lat/lng

@ajlennon

This comment has been minimized.

Contributor

ajlennon commented Oct 14, 2018

@goatchurchprime have you tried setting

max_usb_current=1

@amcewen

This comment has been minimized.

Member

amcewen commented Oct 14, 2018

I have two general approaches:

  1. Use a power supply that provides enough current. The Pi itself can easily take an amp at 5V, so we tend to use the official Pi power supplies which (IIRC) are 2.1A and also 5.1V or 5.2V (or similar, basically a touch over 5V to allow it to droop a bit if there's a big current draw)
  2. If you're using a supply with a separate USB lead, thicker, higher-quality leads work better. The super cheap ones use thinner wire which can't provide enough current
@goatchurchprime

This comment has been minimized.

Contributor

goatchurchprime commented Oct 15, 2018

The MQTT to voice device is now working. The code (which runs under sysctl) is here:
https://github.com/goatchurchprime/vocopi/blob/master/mqtt2voice.py#L43

You can make it speak like this:

mosquitto_pub -h mqtt.local -t "vocopi/tohear" -m "The MQTT, to, speech raspberry pi is now working"

Also, there is a node-red injection button on the dashboard on the big screen that can make it say things too.

Your job is to wire up the blue button on the node-red to say something.

Technical problems that need fixing:

  1. Power There's not enough power on the USB power lead to run the amp, so the rpi keeps rebooting if you draw power off it. I'm using a duff ESP32 to give the 5V on a separate circuit. We need to do this. It would be better if there was only one lead powering this thing (including the amp) reliably. How does Adrian manage with museum in a box?

  2. networking Wifi would be preferable as it would make this thing more portable.

  3. Blip noises I can't get my blips noises to work. These are a good way to demark the start and end of the phrases. We do have 4 different voices in the flite software, I've hard coded the female slt for now as the other voices sound less good quality.

  4. LED flashing It's probably essential that we get some LEDs to flash when it is speaking to replace the feedback you get when a person speaks of their lips moving. They do it in the movies for a reason.

  5. Applications Need some uses. eg "Coffee is ready", "It's 12 o'clock", "The laser cutter is going off" (in fact any automation could be also confirmed/signaled with a voice), "The fresh water is ready", "The sun is about to set" <-- derive this from a formula based on our lat/lng

@ajlennon

This comment has been minimized.

Contributor

ajlennon commented Oct 15, 2018

Is there an echo in here?

@goatchurchprime

This comment has been minimized.

Contributor

goatchurchprime commented Nov 17, 2018

moved to wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment