Skip to content

Conversation

@sigprogramming
Copy link
Collaborator

@sigprogramming sigprogramming commented Apr 14, 2025

内容

generatePhrases 関数のリファクタリングを行います。

  • 単一トラックではなく全トラックのノーツを受け取り、そのノーツからフレーズを生成するように
    • notes, tempos など個別の引数ではなく、必要な情報をまとめた snapshot オブジェクトを受け取るように変更
  • 重なっているノート(trackOverlappingNoteIds に含まれるノート)を除外する処理を generatePhrases 関数内に移動
  • トラックのノーツをフレーズ単位に分割する処理を extractPhraseNotes 関数として切り出し
  • フレーズごとのノーツからフレーズを生成する処理を createPhrasesFromNotes 関数として切り出し

関連 Issue

その他

@sigprogramming sigprogramming requested a review from a team as a code owner April 14, 2025 16:17
@sigprogramming sigprogramming requested review from Hiroshiba and sevenc-nanashi and removed request for a team April 14, 2025 16:17
@voicevox-preview-pages
Copy link

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

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

@Hiroshiba Hiroshiba requested a review from Copilot April 14, 2025 23:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (2)

src/sing/songTrackRendering.ts:395

  • Ensure that snapshot.trackOverlappingNoteIds contains entries for every trackId present in snapshot.tracks to avoid runtime errors when using getOrThrow. Consider adding error handling if an entry is missing.
for (const [trackId, track] of snapshot.tracks) {

src/sing/songTrackRendering.ts:389

  • [nitpick] Consider renaming the parameter 'firstRestMinDurationSeconds' to a more concise identifier (e.g., 'minFirstRestDuration') for improved readability.
export const generatePhrases = async (

@Hiroshiba Hiroshiba requested review from sevenc-nanashi and removed request for sevenc-nanashi April 17, 2025 01:20
Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

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

良さそう。

ここまで分解されてればテストも書けそうな予感?

Copy link
Member

@Hiroshiba Hiroshiba left a comment

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 April 19, 2025 04:37
@Hiroshiba Hiroshiba added this pull request to the merge queue Apr 19, 2025
Merged via the queue into VOICEVOX:main with commit 19cef37 Apr 19, 2025
11 checks passed
@sigprogramming sigprogramming deleted the refactor_generate_phrases_function branch April 19, 2025 05:56
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