Browse Source
Add audio embedding
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
1 changed files with
2 additions and
2 deletions
-
audio_embedding.py
|
@ -30,7 +30,7 @@ def AudioEmbedding(config=None): |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
pipe.input('path') |
|
|
pipe.input('path') |
|
|
.map('path', 'frame', ops.audio_decode.ffmpeg(config.batch_size, config.sample_rate, config.layout)) |
|
|
|
|
|
.map('frame', 'vec', ops.audio_embedding.vggish(config.weights_path, config.framework), config=op_config) |
|
|
|
|
|
|
|
|
.map('path', 'frame', ops.audio_decode.ffmpeg(batch_size=config.batch_size, sample_rate=config.sample_rate, layout=config.layout)) |
|
|
|
|
|
.map('frame', 'vec', ops.audio_embedding.vggish(weights_path=config.weights_path, framework=config.framework), config=op_config) |
|
|
.output('vec') |
|
|
.output('vec') |
|
|
) |
|
|
) |
|
|