Browse Source
Update to use time-window
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
42 additions and
12 deletions
-
audio_embedding_vggish.yaml
|
@ -1,4 +1,4 @@ |
|
|
name: 'audio_embedding_vggish' |
|
|
|
|
|
|
|
|
name: 'audio_decode' |
|
|
operators: |
|
|
operators: |
|
|
- |
|
|
- |
|
|
name: '_start_op' |
|
|
name: '_start_op' |
|
@ -11,31 +11,52 @@ operators: |
|
|
col: 0 |
|
|
col: 0 |
|
|
outputs: |
|
|
outputs: |
|
|
- |
|
|
- |
|
|
df: 'audio' |
|
|
|
|
|
|
|
|
df: 'input_df' |
|
|
iter_info: |
|
|
iter_info: |
|
|
type: map |
|
|
type: map |
|
|
|
|
|
- |
|
|
|
|
|
name: 'audio_decoder' |
|
|
|
|
|
function: 'towhee/audio-decoder' |
|
|
|
|
|
init_args: |
|
|
|
|
|
inputs: |
|
|
|
|
|
- |
|
|
|
|
|
df: 'input_df' |
|
|
|
|
|
name: 'audio_path' |
|
|
|
|
|
col: 0 |
|
|
|
|
|
outputs: |
|
|
|
|
|
- |
|
|
|
|
|
df: 'audio_df' |
|
|
|
|
|
iter_info: |
|
|
|
|
|
type: generator |
|
|
- |
|
|
- |
|
|
name: 'embedding_model' |
|
|
name: 'embedding_model' |
|
|
function: 'towhee/torch-vggish' |
|
|
function: 'towhee/torch-vggish' |
|
|
init_args: |
|
|
init_args: |
|
|
inputs: |
|
|
inputs: |
|
|
- |
|
|
- |
|
|
df: 'audio' |
|
|
|
|
|
name: 'audio_path' |
|
|
|
|
|
|
|
|
df: 'audio_df' |
|
|
|
|
|
name: 'audio' |
|
|
col: 0 |
|
|
col: 0 |
|
|
|
|
|
- |
|
|
|
|
|
df: 'audio_df' |
|
|
|
|
|
name: 'sample_rate' |
|
|
|
|
|
col: 1 |
|
|
outputs: |
|
|
outputs: |
|
|
- |
|
|
- |
|
|
df: 'emb' |
|
|
|
|
|
|
|
|
df: 'output_df' |
|
|
iter_info: |
|
|
iter_info: |
|
|
type: map |
|
|
|
|
|
|
|
|
type: time_window |
|
|
|
|
|
params: |
|
|
|
|
|
time_range_sec: 3 |
|
|
|
|
|
time_step_sec: 3 |
|
|
- |
|
|
- |
|
|
name: '_end_op' |
|
|
name: '_end_op' |
|
|
function: '_end_op' |
|
|
function: '_end_op' |
|
|
init_args: |
|
|
init_args: |
|
|
inputs: |
|
|
inputs: |
|
|
- |
|
|
- |
|
|
df: 'emb' |
|
|
|
|
|
name: 'embs' |
|
|
|
|
|
|
|
|
df: 'output_df' |
|
|
|
|
|
name: 'vec' |
|
|
col: 0 |
|
|
col: 0 |
|
|
outputs: |
|
|
outputs: |
|
|
- |
|
|
- |
|
@ -50,20 +71,29 @@ dataframes: |
|
|
name: 'audio_path' |
|
|
name: 'audio_path' |
|
|
vtype: 'str' |
|
|
vtype: 'str' |
|
|
- |
|
|
- |
|
|
name: 'audio' |
|
|
|
|
|
|
|
|
name: 'input_df' |
|
|
columns: |
|
|
columns: |
|
|
- |
|
|
- |
|
|
name: 'audio_path' |
|
|
name: 'audio_path' |
|
|
vtype: 'str' |
|
|
vtype: 'str' |
|
|
- |
|
|
- |
|
|
name: 'emb' |
|
|
|
|
|
|
|
|
name: 'audio_df' |
|
|
|
|
|
columns: |
|
|
|
|
|
- |
|
|
|
|
|
name: 'audio_frame' |
|
|
|
|
|
vtype: 'numpy.ndarray' |
|
|
|
|
|
- |
|
|
|
|
|
name: 'sample_rate' |
|
|
|
|
|
vtype: 'numpy.ndarray' |
|
|
|
|
|
- |
|
|
|
|
|
name: 'output_df' |
|
|
columns: |
|
|
columns: |
|
|
- |
|
|
- |
|
|
name: 'embs' |
|
|
|
|
|
|
|
|
name: 'vec' |
|
|
vtype: 'numpy.ndarray' |
|
|
vtype: 'numpy.ndarray' |
|
|
- |
|
|
- |
|
|
name: '_end_df' |
|
|
name: '_end_df' |
|
|
columns: |
|
|
columns: |
|
|
- |
|
|
- |
|
|
name: 'embs' |
|
|
|
|
|
|
|
|
name: 'vec' |
|
|
vtype: 'numpy.ndarray' |
|
|
vtype: 'numpy.ndarray' |
|
|