update openai example
This commit is contained in:
parent
48fa91ec93
commit
b0a6072047
1 changed files with 3 additions and 4 deletions
|
|
@ -110,13 +110,12 @@ client = openai.OpenAI(
|
|||
base_url = "http://localhost:8000/v1",
|
||||
)
|
||||
|
||||
response = client.audio.speech.create(
|
||||
with client.audio.speech.with_streaming_response.create(
|
||||
model="tts-1",
|
||||
voice="alloy",
|
||||
input="Today is a wonderful day to build something people love!"
|
||||
)
|
||||
|
||||
response.stream_to_file("speech.mp3")
|
||||
) as response:
|
||||
response.stream_to_file("speech.mp3")
|
||||
```
|
||||
|
||||
Docker support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue