From 6cf2f71791995d8e0335bfbe0a332b6e1d510bb6 Mon Sep 17 00:00:00 2001 From: audio-decode Date: Wed, 1 Feb 2023 19:03:48 +0800 Subject: [PATCH] update readme --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 944e139..7af86a5 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,16 @@ ```Python -import towhee +from towhee.dc2 import pipe, ops, DataCollection -towhee.glob('./music.mp3').audio_decode.ffmpeg().flatten().show(limit=1) +p = ( + pipe.input('audio_file') + .flat_map('audio_file', 'frame', ops.audio_decode.ffmpeg()) + .output('frame') +) +DataCollection(p('./music.mp3')).show(limit=1) -# batch decode -# towhee.glob('./music.mp3').audio_decode.ffmpeg(500).flatten().show(limit=1) ``` @@ -43,10 +46,6 @@ Create the operator via the following factory method: ***audio_decode.ffmpeg()*** -batch decode, batch_size = 100: - -***audio_decode.ffmpeg(100)*** -