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 1 year ago

audio-decode

Audio Decode Implementation With PyAV

author: Junjie Jiang


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.


Code Example

from towhee import pipe, ops, DataCollection

p = (
    pipe.input('audio_file')
    .flat_map('audio_file', 'frame', ops.audio_decode.ffmpeg())
    .output('frame')
)

DataCollection(p('./music.mp3')).show(limit=1)


img


Factory Constructor

Create the operator via the following factory method:

audio_decode.ffmpeg()


Interface

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 (generator):

An generator over audio frames with type towhee.types.AudioFrame.

junjie.jiang e2e2bdbdfe update 21 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 2 years ago
file-icon README.md
939 B
download-icon
update 1 year ago
file-icon __init__.py
117 B
download-icon
Support resample 1 year ago
file-icon audio_decoder_ffmpeg.py
2.0 KiB
download-icon
Support resample 1 year ago
file-icon img.png
8.4 KiB
download-icon
update 2 years ago
file-icon requirements.txt
3 B
download-icon
update 2 years ago