examples icon indicating copy to clipboard operation
examples copied to clipboard

Update audio_spec.py

Open shaoyijia opened this issue 4 years ago • 2 comments

The preprocess_model used by BrowserFftSpec will produce "nan" results when the input tensors contain too many zero entries. Such inputs are common because there may be delays in the recording devices resulting in an empty stream at the beginning of the audio file. This PR fixes this potential "nan" problem by adding a small Gaussian noise to the inputs before they go through the preprocess_model.

shaoyijia avatar Aug 03 '21 02:08 shaoyijia

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Aug 03 '21 02:08 google-cla[bot]

@googlebot I signed it!

shaoyijia avatar Aug 03 '21 02:08 shaoyijia