Merged
Conversation
Member
StephenHodgson
commented
Mar 8, 2025
- Fixed generated clip playback for non-streaming clips
- Updated usages of Task.Delay with WebGL friendly Awaiters.DelayAsync
- Updated TextToSpeechDemo
- Updated Deps
- Updated Unit Tests
- Fixed generated clip playback for non-streaming clips - Updated usages of Task.Delay with WebGL friendly Awaiters.DelayAsync - Updated TextToSpeechDemo - Updated Deps - Updated Unit Tests
There was a problem hiding this comment.
PR Overview
This PR improves the functionality of the ElevenLabs package by fixing generated clip playback for non-streaming clips, replacing Task.Delay with a WebGL friendly delay, updating the TextToSpeechDemo, and adjusting unit tests accordingly.
- Fixed generated audio clip playback in GeneratedClip.cs by reordering logic and properties.
- Replaced Task.Delay with Awaiters.DelayAsync for better cross-platform support.
- Updated TextToSpeechDemo and unit tests to verify clip length and playback.
Reviewed Changes
| File | Description |
|---|---|
| ElevenLabs/Packages/com.rest.elevenlabs/Runtime/Common/GeneratedClip.cs | Refactored audio clip caching and creation logic to support non-streaming clips. |
| ElevenLabs/Packages/com.rest.elevenlabs/Samples~/TextToSpeech/TextToSpeechDemo.cs | Added elapsed time measurement to adjust playback delay and enhanced debug logging. |
| ElevenLabs/Packages/com.rest.elevenlabs/Tests/Test_Fixture_04_TextToSpeechEndpoint.cs | Added assertions comparing audio clip length with reported length to improve test coverage. |
| ElevenLabs/Packages/com.rest.elevenlabs/Runtime/Dubbing/DubbingEndpoint.cs | Updated delay calls to use Awaiters.DelayAsync for WebGL compatibility. |
| ElevenLabs/Packages/com.rest.elevenlabs/Runtime/TextToSpeech/TextToSpeechEndpoint.cs | Fixed the sample rate argument by using a precomputed frequency variable. |
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
This was
linked to
issues
Mar 8, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Mar 8, 2025
- Fixed generated clip playback for non-streaming clips - Updated usages of Task.Delay with WebGL friendly Awaiters.DelayAsync - Updated TextToSpeechDemo - Updated Deps - Updated Unit Tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.