Pure Data Audio Processor

Post Reply
dpoznan
Posts: 60
Joined: Wed Jun 30, 2021 10:50 pm

Pure Data Audio Processor

Post by dpoznan » Sun Jun 23, 2024 9:25 pm

Has anyone used the Pure Data audio processing tool and inserted it into the openMHA audio stream?

I want to identify and modify phonemes in the audio stream and use openMHA and its plugins.
Pure Data does not exist as a plugin so it would be necessary to route the oudio to PD and then back
into the openMHA data stream.

How would one do that? Currently, I am running on a Mac, but will want to move to PHL.

Thanks,

Dan Poznanovic

uno9taitaeJ3
Posts: 1
Joined: Wed Jun 12, 2024 3:04 pm

Re: Pure Data Audio Processor

Post by uno9taitaeJ3 » Tue Jun 25, 2024 10:49 am

The easiest way to achieve this would be to run two openMHA instances and one pd instance and to chain them all using Jack. You have to alter the Jack name of one of the openMHA instances with e.g. io.name=MHA2 and its default TCP port with e.g. port=33336.

dpoznan
Posts: 60
Joined: Wed Jun 30, 2021 10:50 pm

Re: Pure Data Audio Processor

Post by dpoznan » Wed Jun 26, 2024 8:36 pm

I have two instances of openMHA running.

I have jack set via
jack_connect MHA:in_1 system:capture_1
jack_connect MHA:in_2 system:capture_2
jack_connect MHA:out_1 system:playback_1
jack_connect MHA:out_2 system:playback_2
jack_connect MHA2:in_1 system:capture_1
jack_connect MHA2:in_2 system:capture_2
jack_connect MHA2:out_1 system:playback_1
jack_connect MHA2:out_2 system:playback_2


In python I have one instance using
mha_Device.set_val('io.name','MHA2')

and the other using
mha_Device.set_val('io.name','MHA')

How do I connect the PD into jack and the openMHA instances?


Dan..

dpoznan
Posts: 60
Joined: Wed Jun 30, 2021 10:50 pm

Re: Pure Data Audio Processor

Post by dpoznan » Wed Jun 26, 2024 10:07 pm

I think this is the way to connect.... I am working on a test python code


jack_connect MHA:in_1 system:capture_1
jack_connect MHA:in_2 system:capture_2

jack_connect MHA:out_1 pure_data:input_1
jack_connect MHA:out_2 pure_data:input_2

jack_connect pure_data:output_1 MHA2:in_1
jack_connect pure_data:output_2 MHA2:in_2

jack_connect MHA2:out_1 system:playback_1
jack_connect MHA2:out_2 system:playback_2

I'll update with test results..

Dan..

dpoznan
Posts: 60
Joined: Wed Jun 30, 2021 10:50 pm

Re: Pure Data Audio Processor

Post by dpoznan » Wed Jun 26, 2024 10:53 pm

It works. mic-->MHA-->PD---->MHA2--->spkr

in MHA
mha_Device.set_val('io.name','MHA')
mha_Device.set_val('io.con_in ',' [system:capture_1 system:capture_1]')
mha_Device.set_val('io.con_out ',' [pure_data:input_1 pure_data:input_2]')

in MHA2
mha_Device.set_val('io.name','MHA2')
mha_Device.set_val('io.con_in ',' [pure_data:output_1 pure_data:output_2]')
mha_Device.set_val('io.con_out ',' [system:playback_1 system:playback_2]')

Post Reply