Long story short, I can smash bits of bash code together to make it do other things.
I managed to get Mimic (good for low power devices) working with HASS (limited working but good enough for my needs) https://github.com/cooljimy84/TTS-Mimic
I’m trying to get Mimic3 working, but they have changed the way you input file names and i can’t get the format right, or the file is always zero bytes. https://github.com/cooljimy84/TTS-Mimic3
Any one able to point me in the right direction? (and poss explain beyond read a python book (which i really should do to be honest) )
Hi,
Given I’ve been using a Mycroft One and FOSS TTS (Festival from U of Edinburgh) for years, the news that Mycroft was moving to Mimic TTS running locally on the device was great.
I’ve read the HASS speech docs a few times and wondered if it was possible to create a custom integration for Mimic, Mimic running on several Mycroft devices, or even a hybrid skill mixing TTS from HASS to local Mimic TTS + Mycroft announcements + LED message displays.
If it’s all-right, I’ll have a look at you code and see if inspiration strikes!
Festival TTS is just a TCP socket server, and suspect the Mycroft API isn’t that hard given there’s already a STT integration for HASS with Mark II Home Assistant Demo - YouTube. The bit that looked hard (at least reading, not writing Python), was a local HASS speech API that ideally daisy-chained more than one TTS service.
For those who don’t know, the voice of Mycroft One is that of Alan Pope (popey), and I mentioned that Mycroft wouldn’t be the same without his dulcet tones on the YouTube demo comments.
There has been a couple of twitter comments suggesting Alan’s kindly donated speech model will be available on Mycroft Mark II, and also for HASS as part of Mimic.
Here’s hoping…
(In joke - might need a regexp filter to not allow searches for beans though. )
Hi James,
I’m a greybeard software engineer with a couple of reasonably complex Python home automation projects working (MQTT plant watering, minor Mycroft skill patches), but haven’t worked with HASS APIs.
The Ubuntu Podcast is indeed missed - from the Wing Commander to Laura fixing dinosaurs on the Isle of Wight using RPi! It was a lot more interesting than beans.
Last time I looked, HASS called out with text expecting audio back (similar model to streaming music) - which didn’t fit with a text display, nor externally generated TTS. My personal use case would be with Mycroft hardware, so Mimic 3 would be installed and running on the LAN. Treating Mycroft like a Chromecast audio sink with an added Mimic TTS server would work, and I suppose gives the advantage of allowing the same generated audio on many devices.
Does Mimic expose a library for a direct API call, or a TCP socket please? Got side-tracked fixing hardware for friends today, but will have a look myself soon…
TTFN,
Mimic3 implements the MaryTTS API, so you could just use that Home Assistant integration directly. I switched mine over from the MaryTTS I was running in a container and it seems to work fine.
which seems to work. I can go into the “Media” tab in Home Assistant, select MaryTTS and enter text and have it be played on a selected device (in my case, both the browser as well as an ESP32 RaspiAudio Muse Proto device).
The only change that I made from my previous MaryTTS configuration was to change the voice: specification.
You can also access other voices, etc. beyond what was configured in the MaryTTS integration in configuration.yaml. For example, make service calls like this to play on other random media_player devices:
service: tts.marytts_say
data:
entity_id: media_player.raspiaudio_muse_proto
message: >
<speak><voice name="en_UK/apope_low">
Jenny called, and wants you to call back. The number is
<prosody rate="60%"><say-as interpret-as="spell-out">86753o9 </say-as> </prosody>
<break time="500ms"/> Did you get it?
</voice></speak>
Not sure if this addresses your specific use-case, but something that’s pretty easy to try if you have Mimic3 running and accessible on your LAN somewhere…
I got it up and running this morning. The voices are not as natural as the google cloud voices, but it’s definitely close enough for me. I think my next project will be to replace my google minis with open source assistants.