Python talking to mha

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

Python talking to mha

Post by dpoznan » Fri Jan 14, 2022 11:21 pm

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

tobiasherzke
Posts: 118
Joined: Mon Jun 24, 2019 12:51 pm

Re: Python talking to mha

Post by tobiasherzke » Sat Jan 15, 2022 8:37 am

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()

Post Reply