logo
Browse Source

Debug

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 3 years ago
parent
commit
822a4ae1c6
  1. 2
      README.md
  2. 11
      vggish.py

2
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()
)

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

Loading…
Cancel
Save