Merge pull request #50 from jteijema/patch-1

Update README.md with new local endpoint usage example
This commit is contained in:
remsky 2025-01-14 08:03:43 -07:00 committed by GitHub
commit 5fc36961ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,13 +56,14 @@ The service can be accessed through either the API endpoints or the Gradio web i
api_key="not-needed" api_key="not-needed"
) )
response = client.audio.speech.create( with client.audio.speech.with_streaming_response.create(
model="kokoro", model="kokoro",
voice="af_sky+af_bella", #single or multiple voicepack combo voice="af_sky+af_bella", #single or multiple voicepack combo
input="Hello world!", input="Hello world!",
response_format="mp3" response_format="mp3"
) ) as response:
response.stream_to_file("output.mp3") response.stream_to_file("output.mp3")
``` ```
or visit http://localhost:7860 or visit http://localhost:7860