Streaming not working #231
|
I set up a docker compose kokoro runs behind nginx: As I have a smaller digital ocean droplet it works in the web interface but when I hit the api I cannot manage to download files. In the web interface the download of mp3 is not working but wav works. I also see a javascript error in the console: Can you help me and check if the nginx configuration is correctly set up for kokoro or if I missed something? |
Replies: 5 comments
|
debug storage |
|
debug system |
|
debug session pools |
|
When I call it via api called via postman |
|
Short version: drop Your log shows the real failure:
lang_code = ALIASES.get(lang_code, lang_code)
assert lang_code in LANG_CODES, (lang_code, LANG_CODES)
The field is optional. When you leave it out, the server uses the first letter of the voice name, so Fix, just remove the line: {
"model": "kokoro",
"input": "hello world",
"voice": "af_heart",
"response_format": "mp3",
"speed": 1,
"stream": false
}Or if you want to be explicit, On the other two questions: Storage: for normal API use you do not need a host volume. The audio comes back in the HTTP response, and nginx: it is not involved in the 500. That error happens inside the app before any of your proxy settings matter. Two notes if you do streaming later though. You are gzipping The |
Short version: drop
lang_codefrom your request body (or set it to"a"). Passing"lang_code": "en"is what triggers the 500. nginx is not the cause here.Your log shows the real failure:
lang_codehas to be a single letter, one ofa b e f h i p j z. There is no"en". Under the hood thekokoropackage does this when it builds a pipeline:A…