[Impromptu] Speech as Audio Unit?
Glen F
holaglen at gmail.com
Thu Mar 19 17:04:12 GMT 2009
To (partly) answer myself -- I didn't get the TTY speech AU to work yet, but
I did manage to get it to work using NetAudio and the shell command "say
-n"...I'd still like to know if it's possible the other way, directly using
the "ttsp" Audio Unit and Impromptu speech commands... Here's the (or, at
least, a) working version:
(define reverb (au:make-node "aufx" "mrev" "appl"))
(define netaudio (au:make-node "augn" "nrcv" "appl"))
(au:connect-node netaudio 0 reverb 0)
(au:connect-node reverb 0 *au:output-node* 0)
(au:update-graph)
(au:set-param (now) netaudio 0 *au:global-scope* 0 4)
; That actually doesn't work (nor to the values 0, 1, 2, 3).
; I'm not sure how to set the state to "connecting" without using
; the "connect" button in the UI! Until I learn otherwise...click it!
(au:open-view netaudio)
; perhaps there's a more elegant way to do this?
(define shell "do shell script \"say -n AUNetSend 'ree-verby!'\"")
(sys:run-applescript shell)
On Thu, Mar 19, 2009 at 12:31 PM, Glen F <holaglen at gmail.com> wrote:
> Hi there -- can anyone help me get speech synthesis working as an Audio
> Unit? I did it "without", but discovered it was not recorded when using
> au:start-audio-capture...therefore, I want to set it up using an AU.
> Seems there are a few options, but the most tantalizing is the speech AU in
> OS X 10.5...(don't need to use NetReceive) But I'm not sure how to get it
> to talk...I need to get the relevant "channel", but am not familiar enough
> with this stuff to know exactly how...
>
> (define speech (au:make-node "augn" "ttsp" "appl"))
>
> (define reverb (au:make-node "aufx" "mrev" "appl"))
>
> (au:connect-node speech 0 reverb 0)
>
> (au:connect-node reverb 0 *au:output-node* 0)
>
> (au:update-graph)
>
> (au:print-graph)
>
>
> (define voice1 (au:get-speech-channel)) ; this is wrong, I think...?
>
> (au:speak (now) voice1 "Ree-verby!") ; seems to use a non-AU voice channel
>
> I think I'd need to use au:get-property on property 3331
> (kAudioUnitProperty_SpeechChannel), but am not sure exactly how to set
> things up using NSMutableData and all that...or even if that's the right
> approach. Or do I need to use the system call "say -n" and NetReceive AUnit
> to get this going?
>
> Thanks for any tips,
> Glen.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.moso.com.au/pipermail/impromptu/attachments/20090319/cf80d257/attachment.htm
More information about the Impromptu
mailing list