Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Speech generation produces noise #364

Answered by StephenHodgson
MarwenSami asked this question in Q&A
Discussion options

Bug Report

Overview

Using Speech API the output AudioClip doesn't seem to play correctly on unity.
When we play the final audio clip it's just noise playing.
When we play the partial audio clip it sounds crunched (the parts that are generated are overlapping).

I'm using v8.4.4

To Reproduce

Steps to reproduce the behavior:

 var api = new OpenAIClient(apiKey);
 var request = new SpeechRequest("Hello there! I'm sorry, I couldn't find anything. What would you like to do?");
 
 var fullClip = await api.AudioEndpoint.GetSpeechAsync(request, clip =>
 {
 audioSource.PlayOneShot(clip.AudioClip);
 
 });
 
/* OR when I play the final clip it's just noise 

 audioSource.PlayOneShot(fullClip.AudioClip); */
You must be logged in to vote

@MarwenSami I was able to find the source of the problem, and will be fixed in 8.6.6

Replies: 1 comment 4 replies

Comment options

Please update to the latest version 8.6.5

You must be logged in to vote
4 replies
Comment options

My bad, actually my project was already working with v8.6.5 when I encountered the issue.

Comment options

I'll take a look and see if maybe I missed something in the last update.

Comment options

@MarwenSami change the SpeechResponseFormat to PCM as a workaround

Comment options

@MarwenSami I was able to find the source of the problem, and will be fixed in 8.6.6

Answer selected by StephenHodgson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #363 on April 24, 2025 19:01.

AltStyle によって変換されたページ (->オリジナル) /