diff --git a/v.md b/v.md index 8c3b4ae..8607350 100644 --- a/v.md +++ b/v.md @@ -27,6 +27,25 @@ ai.v project - https://elevenlabs.io +- https://console.cloud.google.com/apis/api/texttospeech.googleapis.com + +```sh +curl -s -X POST "https://texttospeech.googleapis.com/v1/text:synthesize" \ + -H "Authorization: Bearer ${ACCESS_TOKEN}" \ + -H "Content-Type: application/json" \ + -d "{ + \"input\": {\"text\": \"${TEXT}\"}, + \"voice\": {\"languageCode\": \"${LANG_CODE}\", \"name\": \"${VOICE}\"}, + \"audioConfig\": { + \"audioEncoding\": \"MP3\", + \"pitch\": ${PITCH}, + \"speakingRate\": ${SPEED} + } + }" | jq -r '.audioContent' | base64 -D > "$TMP_MP3" + +afplay "$TMP_MP3" +``` + ## vmc ## ue \ No newline at end of file