segmented_wavtool における residual_error 更新タイミングの修正#41
Closed
Copilot wants to merge 1 commit intosegmented-synthesisfrom
Closed
segmented_wavtool における residual_error 更新タイミングの修正#41Copilot wants to merge 1 commit intosegmented-synthesisfrom
Copilot wants to merge 1 commit intosegmented-synthesisfrom
Conversation
Owner
|
@copilot ベースブランチを segmented-wavtool にして不具合修正を検討してください。 |
Copilot
AI
changed the title
[WIP] Fix wav length offset in segment_batch_wavtool
Fix residual_error accumulation in segmented_wavtool when skipping empty segments
Nov 2, 2025
Owner
|
@copilot あと、PRの説明などは日本語でお願いします。 |
Contributor
Author
segmented-synthesis ブランチをベースに修正を適用しました。コミット dd1728f で residual_error の計算順序を修正し、空セグメントと非空セグメントの誤差処理を正しく実装しました。 変更内容:
コードレビューとセキュリティチェックも通過しています。 |
Contributor
Author
PR の説明を日本語に統一しました。コミット fd8425b でタイトル、説明、コメントをすべて日本語で記載しています。 |
Owner
|
@copilot 空セグメントでない時でも不具合が発生しています。さらに原因調査を進めてください。 |
Contributor
Author
非空セグメントでの不具合を修正しました(コミット db02a69)。 根本原因: 修正内容:
これにより、空セグメント・非空セグメント両方で誤差累積が正しく行われるようになりました。 |
Copilot
AI
changed the title
Fix residual_error accumulation in segmented_wavtool when skipping empty segments
segmented_wavtool における residual_error 更新タイミングの修正
Nov 2, 2025
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.
wav長さのずれ修正 (Issue #40)
問題の概要
unified_engine.pyのsegmented_wavtool関数において、セグメント連結時のresidual_error更新タイミングに誤りがあり、空セグメント・非空セグメント両方で wav の長さが正しく計算されない問題がありました。問題の原因
セグメントを連結する際、以下の問題がありました:
修正前のコード:
問題点:
非空セグメント時:
residual_errorをオーバーラップ適用前に更新していたadjusted_overlapは前セグメントのresidual_errorで計算されているresidual_error = seg_res_errで上書きしていたresidual_errorのタイミングがずれていた空セグメント時: 新しい
seg_res_errと古いresidual_errorで計算したadjusted_overlapを混在させていた修正内容
変更箇所
unified_engine.py678-712行修正後のコード
修正のポイント
空セグメント時:
非空セグメント時:
adjusted_overlapの計算で前セグメントの誤差は既に考慮されている検証
Fixes #40
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.