f0eval#
- class diffsptk.F0Evaluation(reduction: str = 'mean', out_format: str = 'f0-rmse-cent')[source]#
See this page for details. Note that the gradients cannot be calculated if the output format is related to voiced/unvoiced decision.
- Parameters:
- reduction[‘none’, ‘mean’, ‘sum’]
The reduction type.
- out_format[‘f0-rmse-hz’, ‘f0-rmse-cent’, ‘f0-rmse-semitone’, ‘vuv-error-rate’, ‘vuv-error-percent’, ‘vuv-macro-f1-score’]
The output format.
- diffsptk.functional.f0eval(x: Tensor, y: Tensor, reduction: str = 'mean', out_format: str = 'f0-rmse-cent') Tensor [source]#
Calculate F0 metric.
- Parameters:
- xTensor [shape=(…, N)]
The input F0 in Hz.
- yTensor [shape=(…, N)]
The target F0 in Hz.
- reduction[‘none’, ‘mean’, ‘sum’]
The reduction type.
- out_format[‘f0-rmse-hz’, ‘f0-rmse-cent’, ‘f0-rmse-semitone’, ‘vuv-error-rate’, ‘vuv-error-percent’, ‘vuv-macro-f1-score’]
The output format.
- Returns:
- outTensor [shape=(…,) or scalar]
The F0 metric.
See also