logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 2 years ago

audio-decode

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()
junjiejiangjjj 1efae40067 update 3 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 2 years ago
file-icon README.md
995 B
download-icon
add readme 2 years ago
file-icon __init__.py
101 B
download-icon
update 2 years ago
file-icon audio_decoder_ffmpeg.py
719 B
download-icon
update 2 years ago
file-icon requirements.txt
3 B
download-icon
update 2 years ago