espeak: a NUL byte ends the text and drops the words after it

Open Beginner friendly
#14 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

The bug is in the subprocess call in scriptconv_copyleft/phonemizers/mul.py (EspeakPhonemizer), which passes text to espeak-ng that gets cut at a NUL byte. Start by running the two calls from the issue to confirm the truncation, then look at how the input reaches the subprocess. Done means every word after a NUL reaches espeak-ng, or a named error is raised for NUL input, and both calls from the issue behave accordingly.

Written by the indexing model from the issue text.

Description

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.
Verified: the outputs below come from the evidence of PR 12 (audits/scriptconv-copyleft/espeak-stdin/README.md), reproduced by an independent review on dev and on the PR head.

A NUL byte in the input ends the text for espeak-ng. The words after it are lost with no warning.

Reproduce

from scriptconv_copyleft.phonemizers.mul import EspeakPhonemizer
p = EspeakPhonemizer()
p.phonemize_string("مرحبا\x00بك", "ar")
p.phonemize_string("\x00hello", "en")

Observed

The first call gives mrħbˈaː, so بك is lost. The second call gives an empty string.

Expected

Every word reaches espeak-ng, or the phonemizer raises a named error for a NUL byte. A NUL is never part of readable text, so dropping it or reading it as a space are both safe.

Where

scriptconv_copyleft/phonemizers/mul.py, the subprocess call. espeak-ng reads its input as a C string (espeak_Synth).

Dominant language
Python
Stars
0
Forks
0
Avg merge
6h 42m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TigreGotico/scriptconv-copyleft

All issues in TigreGotico/scriptconv-copyleft

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.