?val

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

?val

Post by dpoznan » Mon Jul 18, 2022 9:16 pm

The doc says ?val will retirve a value


I get the following..

mha [7] ?val:mha.sort_output.mhaconfig_out.srate
(mha_parser) Invalid query mode: "val"


What am I doing wrong?


Dan..

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

Re: ?val

Post by tobiasherzke » Fri Jul 22, 2022 9:38 am

MHA configuration language expects commands in the following order:

<path> <operator> <argument>

In your case, <path> is mha.sort_output.mhaconfig_out.srate, <operator> is the question mark, and <argument> is the query command "val". Change your command to

mha.sort_output.mhaconfig_out.srate?val

and it should work.

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

Re: ?val

Post by tobiasherzke » Fri Jul 22, 2022 3:30 pm

One addition because common instructions for reading openMHA configuration files may seem contradictory to what I just wrote (but aren't):

Our documentation like the getting-started guide contain configuration language commands like this to have the mha read a configuration file:

?read:gain_live_getting_started.cfg

Here, <path> is the empty path, <operator> is question mark, and <argument> is "read:gain_live_getting_started.cfg"

The empty path in MHA configuration language is equal to the root of the configuration language data tree. This example command instructs the root parser to read a configuration file.

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

Re: ?val

Post by dpoznan » Sat Jul 23, 2022 11:03 pm

Thanks much. I find the openmha syntax rather confusing.

It worked...

mha [1] mha.sort_output.mhaconfig_out.srate?val
44100
(MHA:success)
mha [2]


Thanks,

Dan..

Post Reply