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

55 lines
771 B

2 years ago
### 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.
Using the default audio_decode implementation and writing the pipeline in the simplified way
2 years ago
### Code Example
2 years ago
---
2 years ago
```Python
import towhee
2 years ago
towhee.glob('./music.mp3')
.audio_decode().flaten()
2 years ago
```
2 years ago
### Factory Constructor
2 years ago
---
2 years ago
Create the operator via the following factory method
2 years ago
audio_decode.ffmpeg()
2 years ago
### Interface
2 years ago
---
2 years ago
An audio decode operator takes an audio file path as input. It decodes the audio back to audio frames.
2 years ago
**Args:**
2 years ago
**audio** (str):
2 years ago
Audio file path.
2 years ago
**Return** (generator):
2 years ago
An generator over audio frames with type `towhee.types.AudioFrame`.
2 years ago
2 years ago