Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output level 2 with spec type level 1 returns 200 bins no matter what config value is set. #2

Open
oneil512 opened this issue Feb 9, 2024 · 2 comments

Comments

@oneil512
Copy link

oneil512 commented Feb 9, 2024

When I set my config like this

      let launch_config = {
        plot_enable: false,
        spec_type: 1, //mel
        output_level: 2, //spectrum
        f_min: 0,
        f_max: 5000,
        plot_len: 16,
        min_seg_length: 10,
        N_mel_bins: 30,
        window_width: 512,
        window_step: 256,
        auto_noise_gate: false,
        voiced_min_dB: 0,
        voiced_max_dB: 80,
        pre_norm_gain: 1000,
        high_f_emph: 0.0,
      };

my callback like this

async function callback(
        seg_index,
        seg_label,
        seg_time,
        extracted_features
      ) {
        console.log("extracted_features", extracted_features);
    }

In my browser it shows there are 200 bins, not 16 like i specify in plot_len

console log below

extracted_features (200) [Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), Uint32Array(30), …]
@tabahi
Copy link
Owner

tabahi commented Feb 9, 2024

I just tested it myself. It works just fine. Perhaps your script is reloading from the cache. Try clearing the cache. In the console, make sure the config is as you expect by

console.log(launch_config);

image

@oneil512
Copy link
Author

oneil512 commented Feb 9, 2024

I debugged it further and found that if you do not include the plot_canvas param in the launch_config then you get the issue I described

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants