Mycroft looks interesting. At the moment I’m running Home Assistant on an RPi3. HA has detected my Chromecast and is configured to use it as a media player. It also works well with Google TTS, along with other engines, and currently provides various notifications over my living room speakers. What I’d like to do is let HA own media playback and TTS for now, but since it has no capability to process audio input, Mycroft can handle that. So Mycroft takes input from a mic, generates its responses, then pipes them to HA for speech. HA, in turn, routes audio through Chromecast, or any other mechanism I choose to use in the future.
HA exposes an API. I’ve written a shell script that takes text as input, sends it to HA’s TTS, and outputs the result on my receiver. If I can tell Mycroft to run a shell script and pass text to speak as a parameter, then theoretically I can just plug in a USB mic and delegate input. So something like:
/usr/local/bin/say Hello, world.
currently speaks “Hello, world.”
Is there any way to do this? I see that Mimic outputs its TTS as wav files, and I’m also working another angle by setting the wavb/mp3 player commands to another shell script that streams them directly to the Chromecast via HA. Unfortunately I’m having issues with this approach, so instead thought I’d ask about piping text to speak through a shell command.
Alternatively, has anyone gotten Mycroft to stream its audio through Chromecasts directly? It’s discoverable on the network, and for all I know there’s a player that can push audio directly, but I haven’t studied how that works to know whether it is realistic.