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

72 lines
893 B

5 years ago
# Audio Decode Implementation With PyAV
5 years ago
5 years ago
*author: Junjie Jiang*
<br />
### Description
5 years ago
**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.
Using the default audio_decode implementation and writing the pipeline in the simplified way
5 years ago
5 years ago
5 years ago
<br />
5 years ago
5 years ago
### Code Example
5 years ago
```Python
import towhee
5 years ago
towhee.glob('./music.mp3')
5 years ago
.audio_decode().flatten().show(limit=1)
5 years ago
```
5 years ago
5 years ago
![img](./img.png)
5 years ago
5 years ago
<br />
5 years ago
5 years ago
### Factory Constructor
5 years ago
Create the operator via the following factory method
5 years ago
audio_decode.ffmpeg()
5 years ago
5 years ago
5 years ago
<br />
5 years ago
### Interface
5 years ago
An audio decode operator takes an audio file path as input. It decodes the audio back to audio frames.
5 years ago
**Args:**
5 years ago
**audio** (str):
5 years ago
Audio file path.
5 years ago
**Return** (generator):
5 years ago
An generator over audio frames with type `towhee.types.AudioFrame`.
5 years ago