text-to-speech の前処理のメモ
1494 ワード
自前で 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++ で実装されたのほしい
Author And Source
この問題について(text-to-speech の前処理のメモ), 我々は、より多くの情報をここで見つけました https://qiita.com/syoyo/items/b5ab4cc857a0541a8e0f著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .