Skip to content

Instantly share code, notes, and snippets.

@andrewn
Last active February 27, 2018 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewn/dcd1ce1155e11410acd7c515fe7e4c6a to your computer and use it in GitHub Desktop.
Save andrewn/dcd1ce1155e11410acd7c515fe7e4c6a to your computer and use it in GitHub Desktop.
[DO NOT USE] Local speech with neue radiodan

⚠️ These instruction are out-of-date, do not use ⚠️

To get local speech running, you should install simon-say which is an equivalent of speech-dispatcher that uses the macOS say command to speak.

npm install --global https://github.com/andrewn/simon-say/archive/master.tar.gz

Make sure you have the latest radiodan and run the radiodan manager:

cd ~/path/to/radiodan/services/manager
npm start

In another terminal, run simon-say:

SOCKET_PATH=/tmp/speechd.sock simon-say

Then, in yet another terminal, run the speech service:

cd ~/path/to/radiodan/services/speech
NO_AUTO_SPAWN=yes SOCKET_PATH=/tmp/speechd.sock node src/main

In the speech service directory, there's a test.html file which will connect to the WebSocket broker and talk to the speech service. You can tell it which WebSocket broker host and port to connect to. You'll need to serve the test.html file yourself somehow.

To connect to the WS broker running the locally, you can use something like this: http://localhost:whater/test.html?host=localhost&port=8000

You can then use the text box to speak stuff. Or press "List Voices" and pop open the Web Inspector Console to see the response.

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