Skip to content

Instantly share code, notes, and snippets.

@idealwebsolutions
Last active February 24, 2021 08:03
Show Gist options
  • Save idealwebsolutions/84dcb061baa427050672b9b41f900ce8 to your computer and use it in GitHub Desktop.
Save idealwebsolutions/84dcb061baa427050672b9b41f900ce8 to your computer and use it in GitHub Desktop.
Streamlabs TTS one liner to disk
#!/bin/env bash
curl -s -d '{"voice": "'"$1"'", "text": "'"$2"'"}' -H "Content-Type: application/json" -H "Context-Type: application/json" https://streamlabs.com/polly/speak | jq -r '.speak_url' | xargs curl -s -0 --output - | ffmpeg -y -i pipe:0 -vn -acodec copy "$3.ogg"
@purarue
Copy link

purarue commented Aug 1, 2020

thanks. streamlabs responds with a 'no text provided' error if you dont have the context-type application/json, was confusing me for a bit there.

I expanded this into a larger bash script: https://github.com/seanbreckenridge/tts

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