[Top Page][All Pages][Recent Changes]

Edit History:Diff

Changes of アクティブボイス since Epoch

  • + added lines
  • - deleted lines

Return to the edit history

+  
- '''DirectSS''' (Microsoft Direct Speech Synthesis) 
- 
- [[$$toc]]
- - →[[HSP3・サンプルスクリプト]]に戻る
- 
- ----
- DirectSS を使うには、最低以下の二つが必要です。
- 
- Microsoft Speech API 4.0a~%
- http://www.microsoft.com/speech/download/old/sdk40a.asp (spchapi.EXE(848 KB))~%
- 
- Text-To-Speechエンジン~%
- http://www.microsoft.com/msagent/downloads/user.asp#tts  ~%
- (Lernout & Hauspie潤・TTS3000 TTS engine - Japanese (3 MB exe))~%
- 
- 
- アクティブボイスは、レジストリー登録をしないといけません。
- 
- {{{
- スタートボタン -> ファイル名を指定して実行
- }}}
- を選択し
- {{{
- regsvr32.exe C:\WINDOWS\speech\Xvoice.dll
- }}}
- と打ち込むかコピペしてOKボタンを押して下さい。
- 
- * スクリプト
- 
- {{{
- ; <<<< HSP 3.0a サンプル >>>>
- ;
- ;  Microsoft Direct Speech Synthesis
- ;
- onexit gosub *exit
- 
- a="春の野に 霧立ちわたり 降る雪と 人の見るまで 梅の花散る"
- b="雪見れば いまだ冬なり しかすがに 春霞立ち 梅は散りつつ"
- 
- //口ありの場合↓
- ;axobj SAPI,"ActiveVoice.ActiveVoice" ,100,100:axid=objinfo(stat,2)
- newcom SAPI,"ActiveVoice.ActiveVoice" 
- 
- //男性を選択
- SAPI->"Select" 2
- //↓情報を見るだけなのでコメントアウトしても構わない。
- gosub *set
- 
- //音声に特徴を付ける。
- SAPI->"Inject" "\\chr=\"Monotone\"\\"
- SAPI->"Inject" "\\Pit=75\\"
- SAPI->"Inject" "\\Spd=80\\"
- SAPI->"Inject" "\\Vol=32768\\"
- 
- SAPI->"TextData" 0,0, a
- repeat
- 	title ""+SAPI("Speaking")
- 	if (SAPI("Speaking")=-1){break}
- 	wait 10
- loop 
- mes "次-------------------------------------"
- //一度リセット
- SAPI->"Inject" "\\Rst\\"
- //女性を選択
- SAPI->"Select" 1
- 
- //gosub *set
- 
- //一行にまとめてもOK
- SAPI->"Inject" "\\Pit=170\\\\Spd=200\\\\Vol=65535\\"
- 
- SAPI->"TextData" 0,0, b
- repeat
- 	title ""+SAPI("Speaking")
- 	if (SAPI("Speaking")=-2){break}
- 	wait 10
- loop 
- mes "終了"
- delcom SAPI : SAPI=0
- stop
- *set
- mes "ピッチ"
- mes "値 "+SAPI("Pitch")+"::Min "+SAPI("MinPitch")+" Max "+SAPI("MaxPitch")
- mes "スピード"
- mes "値 "+SAPI("Speed")+"::Min "+SAPI("MinSpeed")+" Max "+SAPI("MaxSpeed")
- mes "ボリューム R"
- mes "値 "+SAPI("VolumeRight")
- mes "Min "+SAPI("MinVolumeRight")+" Max "+SAPI("MaxVolumeRight")
- mes "ボリューム L"
- mes "値 "+SAPI("VolumeLeft")
- mes "Min "+SAPI("MinVolumeLeft")+" Max "+SAPI("MaxVolumeLeft")
- return
- *exit
- 	SAPI=0
- end
- }}}
- 文中に'''タグ'''を埋め込む方法
- {{{
- onexit gosub *exit
- newcom SAPI,"ActiveVoice.ActiveVoice" 
- 
- SAPI->"Inject" "\\Rst\\"
- 
- //Selectが利きません
- SAPI->"Select" 2
- //文中のタグを有効にする。
- SAPI("Tagged")=$00000001 
- 
- a={"
- \\Pit=100\\\\Spd=140\\
- 川の上の つらつら椿 つらつらに 
- 
- \\Pit=270\\\\Spd=90\\
- 見れども飽かず 巨勢の春野は
- "}
- SAPI->"Speak" a 
- 
- repeat
- 	title ""+SAPI("Speaking")
- 	if SAPI("Speaking")=0{break}
- 	wait 10
- loop
- 
- delcom SAPI:SAPI=0
- stop
- 
- *exit
- 	SAPI=0
- end 
- }}}
- 
- * 解説
- アクティブボイスには、2種類の発声方法があります。
- 
- 一つは、あらかじめ音声の特徴を指定しておく方法~%
- もう一つは、文中に'''タグ'''を書き込んでしまう方法です。
- 
- 音声にアクセントを付ける操作のほとんどがこの'''タグ'''で指定します。~%
- 後日まとめて掲載します
- 
- SDKはこちらから(4.0aですがこちらのほうがDLサイズ(8MBの物)も小さいしわかりやすい。)~%
- http://www.microsoft.com/speech/download/old/sdk40a.asp ~%
- 
- * メモ 
- 2006/02/03 20:15:10 JST~%
- '''DirectSS''' は、イベントも取れます。( _DirectSSEvents )
- 
- 2006/04/08 13:21:08 JST~%
- 変更~%
- onexit *exit -> onexit gosub *exit