そういえばWin3.1時代に使ってたパソコンの中にもNEC製の音声合成ソフトが入ってましたね。
#r "System.Speech.dll"
open System.Speech.Synthesis
let s = new SpeechSynthesizer()
s.GetInstalledVoices()
|> Seq.map (fun x -> x.VoiceInfo)
|> Seq.iter (fun x ->
printfn "[年齢: %s, カルチャ: %s, 説明: %s, 性別: %s, ID: %s, 名前: %s]"
(x.Age.ToString())
(x.Culture.ToString())
(x.Description)
(x.Gender.ToString())
(x.Id)
(x.Name) )
s.GetInstalledVoices()
|> Seq.toArray
|> Array.map (fun x -> x.VoiceInfo)
|> Array.map (fun v ->
s.SelectVoice(v.Name)
s.Speak(if v.Culture.Name = "ja-JP" then
"私の名前は" + v.Name + "です。"
else
"My name is " + v.Name + ", thank you." ) )