question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mismatch in sampling rate for speech-commands

See original GitHub issue

I am getting the following in my browser console: “WebGL is not supported on this device”.

I cannot enable it as well because my institution has disabled “Use Hardware acceleration when possible”. So, tensorflow.js is using “cpu” as the backend: console.log(tf.getBackend()); output: cpu

However, now I am getting wrong predictions because of the following error: “Mismatch in sampling rate: Expected: 44100; Actual: 48000”

Please help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
Arpitrfcommented, Sep 1, 2020

I think I have found a solution to this. In browser_fft_extractor.js (line 185) changing: this.audioContext = new this.audioContextConstructor() as AudioContext; to this.audioContext = new this.audioContextConstructor({sampleRate:44100}) as AudioContext; Worked for me.

Let me know if this seems correct to you and if it does, I can make a pull request.

0reactions
google-ml-butler[bot]commented, Mar 18, 2021

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Mismatch in sampling rate: Expected: 16000; Actual
The browser has a default and fixed value of the sampling rate of audio recording. The following will output the frequency rate of...
Read more >
Fix sampleRate mismatch. (#612) · 0b4801f6f5 - tfjs-models - Gitea ...
`Mismatch in sampling rate: ` +. `Expected: ${this.sampleRateHz}; ` +. `Actual: ${this.audioContext.sampleRate}`);. } const streamSource = this.
Read more >
Fix: Windows 10 sample rate mismatch causing garbled audio
Fix: Windows 10 sample rate mismatch causing garbled audio · 1. Open Windows Settings and click on the System heading · 2. Click...
Read more >
A Study of Low-Resource Speech Commands Recognition based ...
To solve the label mismatches between source and target domains and further ... The speech utterances are recorded at a sampling rate of...
Read more >
Google's Speech Commands Dataset - Pyroomacoustics
data · the actual audio signal · array_like ; fs · sampling frequency · int.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found