Groups
Sign in
Groups
cocoa-dev-japan
Conversations
About
Send feedback
Help
テキスト読み上げ音声にエフェクトを掛ける
67 views
Skip to first unread message
m_yukio
unread,
Aug 30, 2009, 10:11:22 PM
8/30/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cocoa-dev-japan
NSSpeechSynthesizerとCoreAudioのAUGraphについて、質問させてください。
まず、最初に、sayコマンドとAU Labで試してみました。
「say -n : -f テキストファイル」でテキストファイルを読み上げます。
"-n :"でAUNetSendサービスのポートに音声が出力されます。
AU LabでAudio Unit Generator「AUNetReceive」を追加し、接続すると、sayコマンドの出力が入力となり、
AU Labでエフェクトを掛ける事ができます。
これをアプリケーションで、NSSpeechSynthesizerで読み上げた音声をAUGraphでAudioUnitのエフェクトを掛けたいと
思っています。
NSSpeechSynthesizerでテキストを指定してスタートすると、Macのスピーカーから読み上げた音声が聞こえると思います。
CoreAudioのAUGraphでは、入力のノードを用意する際、AU Labと同じで、
componentTypeをkAudioUnitType_Generator
componentSubTypeをkAudioUnitSubType_NetReceive
にすれば、sayコマンドでAUNetSendサービスに出力した音声を受け取る事が出来ます。
この二つを繋げたいのですが、どう考えればいいのか教えていただけないでしょうか?
NSSpeechSynthesizerで音声の出力先をAUNetSendにする方法があるのでしょうか?
AUGraphのGeneratorで、デフォルト出力?に出力しようとしている音声データを横取りする方法があるのでしょうか?
NSSpeechSynthesizerのSpeech Synthesizer Property Keysに、
NSSpeechOutputToFileURLPropertyというのがあります。出力先をURLに変更できるようなのですが、これをプログラム間
の通信に使うのかなと思いました。sayコマンドは、この方法でオプション"-n"をじつげんしているのでしょうか。
m_yukio
unread,
Sep 4, 2009, 1:05:10 PM
9/4/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cocoa-dev-japan
上手くいきました。
ただ、まだ、コードが整理できていませんので、言葉だけの説明とさせてください。
AudioUnitのGeneratorの種類に、kAudioUnitSubType_SpeechSynthesisというのがあり、これで
AUGraphの入力のノードを生成し、これに対応するchannelを取得し、CoreFoundationのAPIでスピーチさせると、上手く行き
ます。
Reply all
Reply to author
Forward
0 new messages