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"
@idealwebsolutions
Copy link
Author

Voices available:

[Nicole, Enrique, Tatyana, Russell, Lotte, Geraint, Carmen, Mads, Penelope, Mia, Joanna, Matthew, Brian, Seoyeon, Ruben, Ricardo, Maxim, Lea, Giorgio, Carla, Naja, Maja, Astrid, Ivy, Kimberly, Chantal, Amy, Vicki, Marlene, Ewa, Conchita, Karl, Zeina, Miguel, Mathieu, Justin, Lucia, Jacek, Bianca, Takumi, Ines, Gwyneth, Cristiano, Mizuki, Celine, Zhiyu, Jan, Liv, Joey, Raveena, Filiz, Dora, Salli, Aditi, Vitoria, Emma, Hans, Kendra]

@seanbreckenridge
Copy link

seanbreckenridge 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