VOISEPEAK関連のメモ
前提
コマンドメモ
基本
voicepeak -s [読み上げさせる文章] -n [ライブラリ/ナレーター] -o [outpath]
参考元のこれで考える方が早い。
## helpコマンドあったわ
-s, --say Text Text to say -t, --text File Text file to say -o, --out File Path of output file -n, --narrator Name Name of voice, check --list-narrator -e, --emotion Expr Emotion expression, for example: happy=50,sad=50. Also check --list-emotion --list-narrator Print voice list --list-emotion Narrator Print emotion list for given voice -h, --help Print help --speed Value Speed (50 - 200) --pitch Value Pitch (-300 - 300)
残念ながら調声はできなさそう。
# 引数を作成
args = [
exepath,
"-s", script, #読み上げる文章
"-n", narrator, #ライブラリ/ナレーター
"-o", outpath, #出力先
"--speed", 100, #50-200の数値
"--pitch", 0, #ピッチも変更できる。-300から300まで選べるらしいが本当かどうか不明
"-e", f"happy={happy},sad={sad},angry={angry},fun={fun}" #感情 ライブラリによって異なる
]
# プロセスを実行
process = subprocess.Popen(args)
Voicepeakのナレーター(=ライブラリ)一覧を確認する
voicepeak --list-narrator
出力イメージ
Asumi Shuo Frimomen Koharu Rikka SEKAI COKO
感情一覧を確認する
voicepeak --list-emotion "SEKAI"
出力イメージ
happy sad fun angry
注意点
文字数制限
In this version, the character limit for a single run is 140 characters, but the input string contains 260 characters. これで泥沼に陥ったし、デバッグ作業で$5くらい使ってしまった