Skip to content

feat: 音声のスケジューリングでずれが発生しないようにする - #2594

Merged
Hiroshiba merged 1 commit into
VOICEVOX:mainfrom
sigprogramming:modify_audio_scheduling_process
Mar 7, 2025
Merged

feat: 音声のスケジューリングでずれが発生しないようにする#2594
Hiroshiba merged 1 commit into
VOICEVOX:mainfrom
sigprogramming:modify_audio_scheduling_process

Conversation

@sigprogramming

Copy link
Copy Markdown
Collaborator

内容

音声のスケジューリングでずれが発生しないようにします。
#2215 (comment) の2番目の方法で実装します)

関連 Issue

その他

@sigprogramming
sigprogramming requested a review from a team as a code owner March 5, 2025 12:03
@sigprogramming
sigprogramming requested review from Hiroshiba and removed request for a team March 5, 2025 12:03
@voicevox-preview-pages

Copy link
Copy Markdown

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:c1cadc0

@Hiroshiba
Hiroshiba requested a review from Copilot March 7, 2025 04:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR implements a fix to prevent timing discrepancies in audio scheduling. Key changes include:

  • Adding a helper function to determine the earliest schedulable context time.
  • Introducing a new private audioContext field in the AudioPlayerVoice class.
  • Adjusting the scheduling logic in AudioPlayerVoice.start to compensate for potential delays.

Reviewed Changes

File Description
src/sing/audioRendering.ts Added a helper function and modified AudioPlayerVoice to adjust schedule

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/sing/audioRendering.ts:554

  • Ensure that the variable 'offset' is properly defined and validated prior to being modified within the adjustment block to avoid potential runtime errors.
const earliestSchedulableContextTime = getEarliestSchedulableContextTime(

@Hiroshiba Hiroshiba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

ロジックがこれで問題ないのかは実はちょっとわかってませんが、動かしてみた感じ特に問題は見つからなかったので良さそう!!

@Hiroshiba
Hiroshiba enabled auto-merge March 7, 2025 04:58
@Hiroshiba
Hiroshiba added this pull request to the merge queue Mar 7, 2025
Merged via the queue into VOICEVOX:main with commit bb48c83 Mar 7, 2025
@sigprogramming
sigprogramming deleted the modify_audio_scheduling_process branch March 7, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants