copied
Readme
Files and versions
1.8 KiB
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)
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
.
More Resources
- Scalar Quantization and Product Quantization - Zilliz blog: A hands-on dive into scalar quantization (integer quantization) and product quantization with Python.
- Vector Database Use Case: Audio Similarity Search - Zilliz: Building agile and reliable audio similarity search with Zilliz vector database (fully managed Milvus).
- Real-Time GenAI without Hallucination Using Confluent & Zilliz Cloud: nan
- Audio Retrieval Based on Milvus - Zilliz blog: Create an audio retrieval system using Milvus, an open-source vector database. Classify and analyze sound data in real time.
1.8 KiB
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)
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
.
More Resources
- Scalar Quantization and Product Quantization - Zilliz blog: A hands-on dive into scalar quantization (integer quantization) and product quantization with Python.
- Vector Database Use Case: Audio Similarity Search - Zilliz: Building agile and reliable audio similarity search with Zilliz vector database (fully managed Milvus).
- Real-Time GenAI without Hallucination Using Confluent & Zilliz Cloud: nan
- Audio Retrieval Based on Milvus - Zilliz blog: Create an audio retrieval system using Milvus, an open-source vector database. Classify and analyze sound data in real time.