From 822a4ae1c643f81468aa519454afc84950f70b01 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Wed, 1 Jun 2022 17:33:35 +0800 Subject: [PATCH] Debug Signed-off-by: Jael Gu --- README.md | 2 ++ vggish.py | 11 ----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0285841..8eead77 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ import towhee ( towhee.glob('test.wav') .audio_decode.ffmpeg() + .runas_op(func=lambda x:[y[0] for y in x]) .audio_embedding.vggish() .show() ) @@ -40,6 +41,7 @@ import towhee ( towhee.glob['path']('test.wav') .audio_decode.ffmpeg['path', 'frames']() + .runas_op['frames', 'frames'](func=lambda x:[y[0] for y in x]) .audio_embedding.vggish['frames', 'vecs']() .show() ) diff --git a/vggish.py b/vggish.py index 9b8a054..c68775c 100644 --- a/vggish.py +++ b/vggish.py @@ -71,14 +71,3 @@ class Vggish(NNOperator): log.error("Fail to load audio data.") raise e - -# if __name__ == '__main__': -# encoder = Vggish() -# -# # audio_path = '/path/to/audio' -# # vec = encoder(audio_path) -# -# audio_data = numpy.zeros((2, 441344)) -# sample_rate = 44100 -# vec = encoder(audio_data, sample_rate) -# print(vec)