MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / mel_to_freq

Function mel_to_freq

machine_learning/mfcc.py:292–307  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

290
291
292def 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
310def mel_spaced_filterbank(

Callers 1

get_filter_pointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected