Page 1 of 1

Python talking to mha

Posted: Fri Jan 14, 2022 11:21 pm
by dpoznan
I want to communicate with mha remotely with python.

In a cfg file one says:

mha.mute_dummies.min = -120

In the python code I would say

mha.set_val('mha.mute_dummies.min','-120')

But how would I write

mha.transducers.mhachain.split.bte.adm?read:/etc/mahalia/generic-hearing-aid/adm.cfg

in my python code?

What are the other functions that are used in python besides set_val()? Where is the documentation?

Dan..



mha.mute_dummies.min = -120

Re: Python talking to mha

Posted: Sat Jan 15, 2022 8:37 am
by tobiasherzke
how would I write

mha.transducers.mhachain.split.bte.adm?read:/etc/mahalia/generic-hearing-aid/adm.cfg

in my python code?

Code: Select all

mha.read_cfg('/etc/mahalia/generic-hearing-aid/adm.cfg','mha.transducers.mhachain.split.bte.adm')
What are the other functions that are used in python besides set_val()? Where is the documentation?

Code: Select all

help(mha)
assuming your mha connection object was created similar to

Code: Select all

import openMHA
mha = openMHA.MHAConnection()