tts: --multi-speaker accepts extra '=' separators during --dry-run and normal execution
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Read internal/cli/custom/tts.go at buildSpeechConfig near line 412 and the TestBuildSpeechConfig cases. The issue reports that strings.Cut accepts extra = separators; verify the malformed examples in dry-run mode and compare with the proposed validation check. Done means malformed mappings return ExitUsage with a clear flag error, while valid mappings still pass the focused test.
索引モデルが issue の本文から書いたものです。
説明
Description
buildSpeechConfig in internal/cli/custom/tts.go uses strings.Cut(pair, "="), which splits only at the first =. Entries such as Alice=Kore=oops, Alice==Kore, and Alice=Kore= are accepted as speaker mappings. Dry-run exits 0; normal execution sends the malformed voice to the API.
Reproduction
gemini-api --no-keyring tts 'Alice: hi. Bob: hello.' \
--multi-speaker 'Alice=Kore=oops,Bob=Puck' --dry-run -o json
echo $?
Current: 0, with "voice":"Kore=oops" in the preview. Expected: 2 (ExitUsage), with a clear flag error. With the fix below, the same command exits 2.
Proposed fix
Add the extra separator check at internal/cli/custom/tts.go:412:
if !ok || name == "" || voice == "" || strings.Contains(voice, "=") {
The fix branch changes this line and adds four cases to TestBuildSpeechConfig. The focused test, full test suite, and go vet ./internal/cli/custom pass.
I can open a PR if you'd like one.
- 主要言語
- Go
- スター
- 514
- フォーク
- 84
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 69
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google-gemini/gemini-api-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
google-gemini/gemini-api-cli#231 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
google-gemini/gemini-api-cli#227 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google-gemini/gemini-api-cli#221 ·
メンテナーはふだん 1 日以内に返信
-
..オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
google-gemini/gemini-api-cli#205 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
google-gemini/gemini-api-cli#176 ·
メンテナーはふだん 1 日以内に返信
google-gemini/gemini-api-cli の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
google/osv-scanner#3327 ·
メンテナーはふだん 1 日以内に返信
-
tld-snapshot
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
awslabs/ferret-scan#1064 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
VictoriaMetrics/VictoriaTraces#335 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
DaoCloud/DaoCloud-docs#7839 ·
メンテナーはふだん 1 日以内に返信