registry: get_phonemizer(G2PW, model=path) drops the path with no error

オープン 初心者向け
#409 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

まず scriptconv/phonemizers/registry.py の 140-148 行目を読んでください。get_phonemizer は、引数を転送する前に、バックエンドのコンストラクタが model、engine、register のどれを宣言しているかを調べます。次に、G2PWPhonemizer.__init__ と scriptconv/phonemizers/g2pw.py の 232 行目を比較してください。これは alphabet しか受け付けません。issue のスニペットで再現し、パスが暗黙的に破棄されることを確認してください。完了とは、model が受け取れないバックエンドに渡された場合の明示的なエラー(または警告)と、拒否するケースと受け入れるケースの両方をカバーするテストがある状態です。

索引モデルが issue の本文から書いたものです。

説明

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

Verified against source: the lines and outputs below were read and run on scriptconv origin/dev 03b4c08.

Observed

get_phonemizer(G2PW, model=path) drops the path with no error and no warning. G2PWPhonemizer.__init__ (scriptconv/phonemizers/g2pw.py line 232) takes only alphabet. get_phonemizer (scriptconv/phonemizers/registry.py lines 140 to 148) forwards model only to a constructor that declares model, engine or register, and else builds the backend without it.

Expected

A model that the backend cannot take raises an error, or at least logs a warning, so a caller does not get the default model when the caller asked for another one.

Reproduce

from scriptconv.phonemizers.registry import get_phonemizer
from scriptconv.phonemizers.enums import Phonemizer

get_phonemizer(Phonemizer.G2PW, model="/path/to/model.onnx")  # no error; the path is not used

Where

scriptconv/phonemizers/registry.py lines 140 to 148, and scriptconv/phonemizers/g2pw.py line 232.

主要言語
Python
スター
4
フォーク
1
平均マージ
8時間 57分
マージ済み PR(30日)
118

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TigreGotico/scriptconv のほかの issue

TigreGotico/scriptconv の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。