From de2b0cf1737438c534349e1b25504fd04d3c1001 Mon Sep 17 00:00:00 2001 From: shiyu22 Date: Fri, 24 Mar 2023 15:38:10 +0800 Subject: [PATCH] Add audio_embedding_clmr.py Signed-off-by: shiyu22 --- audio_embedding_clmr.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 audio_embedding_clmr.py diff --git a/audio_embedding_clmr.py b/audio_embedding_clmr.py new file mode 100644 index 0000000..dc71185 --- /dev/null +++ b/audio_embedding_clmr.py @@ -0,0 +1,11 @@ +from towhee import pipe, ops, AutoPipes + +@AutoPipes.register +def AudioEmbeddingVggish(): + return ( + pipe.input('path') + .map('path', 'frame', ops.audio_decode.ffmpeg()) + .map('frame', 'vec', ops.audio_embedding.clmr()) + .output('vec') + ) + \ No newline at end of file