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)*** -