Auto pauses are measured in bytes, so Japanese gets extra pauses

Aperta Adatta ai principianti
#1,042 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Inizia in src/tts.rs, in corrispondenza di compute_auto_pause, e controlla come la lunghezza delle stringhe determina il posizionamento delle pause. Poi leggi i test ja inverse_trig_puts_inverse_after_the_function e trigonometric_function_names, che mostrano le virgole indesiderate nelle stringhe attese. Il lavoro è concluso quando il comportamento delle pause in giapponese corrisponde alla pronuncia prevista e il comportamento in inglese e questi test restano corretti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

compute_auto_pause in src/tts.rs measures the strings with .len(), which is the UTF-8 byte count, so a Japanese word (3 bytes per character) counts about three times as long as the same amount of speech in English. The after_len < 3 check that keeps the pause away from "of" also never matches オブ, the word ja uses for "of", because it is 6 bytes. As a result ja says "サイン インバース, オブ x" and "コタンジェント, オブ x" where en says "inverse sine of x"; you can see the comma in the expected strings of the ja tests inverse_trig_puts_inverse_after_the_function and trigonometric_function_names. Would counting characters (.chars().count()) be fine with you, or would you rather handle it another way? I can make the PR either way.

Lingua principale
Rust
Stelle
131
Fork
97
Merge medio
19h 51m
PR unite (30g)
120

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di daisy/MathCAT

Tutte le issue di daisy/MathCAT

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.