As shown in the docs, we can handle models that have different heads for different sexes, e.g.
def f0(signal, sampling_rate, idx, gender, f0_range):
# extract mean f0 using a gender adapted range
y = librosa.yin(
signal,
fmin=f0_range[gender[idx]][0],
fmax=f0_range[gender[idx]][1],
sr=sampling_rate,
).mean()
return y, gender[idx]
interface = audinterface.Feature(
['f0', 'gender'],
process_func=f0,
process_func_args={
'gender': gender,
'f0_range': f0_range,
},
)
The problem is that the gender argument is not really static but depends on the input data.
To update it you would need to create a new Feature object for each new database, which is not what we want for ONNX models, or you could update the process_func_args, which is ok, but they are hidden under interface.process.process_func_args.
So maybe we update the documentation by showing an example how to update them?
As shown in the docs, we can handle models that have different heads for different sexes, e.g.
The problem is that the
genderargument is not really static but depends on the input data.To update it you would need to create a new
Featureobject for each new database, which is not what we want for ONNX models, or you could update theprocess_func_args, which is ok, but they are hidden underinterface.process.process_func_args.So maybe we update the documentation by showing an example how to update them?