tts: --multi-speaker accepts extra '=' separators during --dry-run and normal execution
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- backend-api-design, cli
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 514
- Forks
- 84
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google-gemini/gemini-api-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
google-gemini/gemini-api-cli#231 · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
google-gemini/gemini-api-cli#227 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google-gemini/gemini-api-cli#221 ·
Maintainers usually reply within 1 day
-
..Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
google-gemini/gemini-api-cli#205 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
google-gemini/gemini-api-cli#176 ·
Maintainers usually reply within 1 day
All issues in google-gemini/gemini-api-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
google/osv-scanner#3327 ·
Maintainers usually reply within 1 day
-
tld-snapshot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
awslabs/ferret-scan#1064 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
VictoriaMetrics/VictoriaTraces#335 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 62/100
DaoCloud/DaoCloud-docs#7839 ·
Maintainers usually reply within 1 day