LoginSignup
0
0

More than 3 years have passed since last update.

text-to-speech の前処理のメモ

Last updated at Posted at 2019-06-06

自前で text-to-speech したい場合, テキスト(transcript)の前処理が必要になるケースがあります.

英語を想定します.

たとえば 42 -> forty-two など(こういうのを全体的に何と呼ぶのかはわかっておりませんが, keithito tacotron では cleaner という呼び方をしていますね)

keithito's tacotron の text/clearner.py が参考になります.

既存の tts サービスなどはこのあたりを対応していますね.

数字の展開

Python ですと inflect ライブラリがあります(keithito tacotron も inflect を呼んでいる)

短縮形の展開

Dr. -> doctor など. いくつかは keithito tacotron で自前でやっています.

You've -> You have など. contractions ライブラリがあります.

その他参考になりそうなもの

spaCy で全部よろしくやってくれるかしら? https://spacy.io/

突き詰めると NLP の世界になってきますね.

TODO

  • spelling correction
  • 数式を word に展開したい(1/3 -> one over three など)
  • C++ で実装されたのほしい
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0