diff --git a/audio_embedding_vggish.py b/audio_embedding_vggish.py new file mode 100644 index 0000000..3442a8f --- /dev/null +++ b/audio_embedding_vggish.py @@ -0,0 +1,10 @@ +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.vggish()) + .output('vec') + ) \ No newline at end of file