copied
Readme
Files and versions
995 B
Description
Audio Decode converts the encoded audio back to uncompressed audio frames. In most cases, audio decoding is the first step of an audio processing pipeline.
Interface
def audio_decode.${op_name}(**kwargs):
def ${op_name}.call(audio)
"""
An audio decode operator takes an audio file path as input. It decodes the audio back to audio frames.
Args:
audio (str):
Audio file path.
Return (iterable):
An iterator over audio frames with type towhee.types.AudioFrame
.
"""
Code Example
Using the default audio_decode implementation and writing the pipeline in the simplified way
import towhee.DataCollection as dc
dc.glob(./music.flac)
.audio_decode()
.show()
Using the ffmpeg based implementations of audio_decode to write a same pipeline
import towhee.DataCollection as dc
dc.glob['path'](./music.flac)
.audio_decode.ffmpeg['path', 'frames']()
.select('frames')
.show()
995 B
Description
Audio Decode converts the encoded audio back to uncompressed audio frames. In most cases, audio decoding is the first step of an audio processing pipeline.
Interface
def audio_decode.${op_name}(**kwargs):
def ${op_name}.call(audio)
"""
An audio decode operator takes an audio file path as input. It decodes the audio back to audio frames.
Args:
audio (str):
Audio file path.
Return (iterable):
An iterator over audio frames with type towhee.types.AudioFrame
.
"""
Code Example
Using the default audio_decode implementation and writing the pipeline in the simplified way
import towhee.DataCollection as dc
dc.glob(./music.flac)
.audio_decode()
.show()
Using the ffmpeg based implementations of audio_decode to write a same pipeline
import towhee.DataCollection as dc
dc.glob['path'](./music.flac)
.audio_decode.ffmpeg['path', 'frames']()
.select('frames')
.show()