Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson authored Nov 25, 2024
1 parent b480299 commit 2ac911f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ Generates audio from the input text.
```csharp
var api = new OpenAIClient();
var request = new SpeechRequest("Hello world!");
var speechClip = await api.AudioEndpoint.CreateSpeechAsync(request);
var speechClip = await api.AudioEndpoint.GetSpeechAsync(request);
audioSource.PlayOneShot(speechClip);
Debug.Log(speechClip);
```
Expand All @@ -1675,7 +1675,7 @@ Generate streamed audio from the input text.
```csharp
var api = new OpenAIClient();
var request = new SpeechRequest("Hello world!", responseFormat: SpeechResponseFormat.PCM);
var speechClip = await api.AudioEndpoint.CreateSpeechStreamAsync(request, partialClip =>
var speechClip = await api.AudioEndpoint.GetSpeechAsync(request, partialClip =>
{
audioSource.PlayOneShot(partialClip);
});
Expand Down

0 comments on commit 2ac911f

Please sign in to comment.