mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
Merge pull request #50 from jteijema/patch-1
Update README.md with new local endpoint usage example
This commit is contained in:
commit
5fc36961ac
1 changed files with 4 additions and 3 deletions
|
@ -56,13 +56,14 @@ The service can be accessed through either the API endpoints or the Gradio web i
|
|||
api_key="not-needed"
|
||||
)
|
||||
|
||||
response = client.audio.speech.create(
|
||||
with client.audio.speech.with_streaming_response.create(
|
||||
model="kokoro",
|
||||
voice="af_sky+af_bella", #single or multiple voicepack combo
|
||||
input="Hello world!",
|
||||
response_format="mp3"
|
||||
)
|
||||
) as response:
|
||||
response.stream_to_file("output.mp3")
|
||||
|
||||
```
|
||||
|
||||
or visit http://localhost:7860
|
||||
|
|
Loading…
Add table
Reference in a new issue