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

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

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

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

評価

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

調査の方向性

src/tts.rs の compute_auto_pause から始めて、文字列の長さがどのようにポーズの配置を決めるかを調べてください。次に、期待される文字列に不要なカンマが含まれていることを示す ja テスト inverse_trig_puts_inverse_after_the_function と trigonometric_function_names を読んでください。日本語のポーズ動作が意図した読み上げに合致し、英語の動作とこれらのテストが正しいままであれば完了です。

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

説明

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.

主要言語
Rust
スター
131
フォーク
97
平均マージ
19時間 51分
マージ済み PR(30日)
120

環境構築

はじめの一歩

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

daisy/MathCAT のほかの issue

daisy/MathCAT の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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