Closed Barloew closed 4 months ago
You are getting a 400 response from elevenlabs. Are you sure all the parameters you have configured are valid? Maybe @mgorsk1 has seen this before and has some ideas?
@Barloew you should configure your sonos service so it uses voice id not voice name. so try "voiceId": "pMsXgVXv3BLzUgSXRplE" instead of "voiceId": "Serena". More info https://elevenlabs.io/docs/voicelab/pre-made-voices
@jishi @mgorsk1 Thank you both. That fixed it alright!
ERROR MESSAGE IN BROWSER
{ "status": "error", "error": "File not found: /app/static/tts/elevenlabs-bd0a4193b78044b25b85cba4b9a779a8a4bd4bca-Serena.mp3", "stack": "Error: File not found: /app/static/tts/elevenlabs-bd0a4193b78044b25b85cba4b9a779a8a4bd4bca-Serena.mp3\n at Object.fromFile (/app/node_modules/strtok3/lib/index.js:43:45)\n at ParserFactory.parseFile (/app/node_modules/music-metadata/lib/ParserFactory.js:29:24)\n at MusicMetadataParser.parseFile (/app/node_modules/music-metadata/lib/index.js:83:46)\n at Object.parseFile (/app/node_modules/music-metadata/lib/index.js:175:46)\n at fileDuration (/app/lib/helpers/file-duration.js:4:20)\n at /app/lib/tts-providers/elevenlabs.js:70:14\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)" }
ERROR MESSAGE IN DOCKER CONTAINER (chrisns / docker-node-sonos-http-api : latest)
MY CONFIG.JSON
{ "elevenlabs": { "auth": { "apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, "config": { "voiceId": "Serena", "stability": 0.5, "similarityBoost": 0.75, "speakerBoost": true, "style": 1, "modelId": "eleven_multilingual_v2" } }, "announceVolume": 40, "webhook": "http://localhost:5007/", "spotify": { "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
MY DOCKER CONTAINER CREATION CONFIG
local directories and the settings file:
mkdir clips mkdir cache mkdir presets mkdir tts curl https://raw.githubusercontent.com/jishi/node-sonos-http-api/master/presets/example.json > presets/example.json echo {} > settings.json
run the docker image:
docker run \ --net=host \ --name sonos \ --restart=always \ -d \ -v
pwd
/settings.json:/app/settings.json \ -vpwd
/clips:/app/static/clips \ -vpwd
/cache:/app/cache \ -vpwd
/presets:/app/presets \ -vpwd
/tts:/app/static/tts \ chrisns/docker-node-sonos-http-api