Convert a frequency in the mel scale to Hertz. Args: mels: The frequency in mel scale. Returns: The frequency in Hertz. Examples: >>> round(mel_to_freq(999.99), 2) 1000.01
(mels: float)
| 290 | |
| 291 | |
| 292 | def mel_to_freq(mels: float) -> float: |
| 293 | """ |
| 294 | Convert a frequency in the mel scale to Hertz. |
| 295 | |
| 296 | Args: |
| 297 | mels: The frequency in mel scale. |
| 298 | |
| 299 | Returns: |
| 300 | The frequency in Hertz. |
| 301 | |
| 302 | Examples: |
| 303 | >>> round(mel_to_freq(999.99), 2) |
| 304 | 1000.01 |
| 305 | """ |
| 306 | # Use the formula to convert mel scale to frequency |
| 307 | return 700.0 * (10.0 ** (mels / 2595.0) - 1.0) |
| 308 | |
| 309 | |
| 310 | def mel_spaced_filterbank( |