Comments (2)
webrtc's VAD only works with frames that are 10 ms, 20 ms or 30 ms long. The sample rate must be 8000, 16000, 32000 or 48000 Hz. The sample width must be 16 bits. Data that does not fit these restrictions will cause an error.
The line of code you reference is calculating the number of bytes in a frame. E.g. 10 ms of audio recorded at 16000 samples/second, where each sample is 2 bytes (that's there the * 2
comes from) would be 16000 * (10 / 1000.0) * 2 = 320 bytes.
So the only way you can change the frame_length
is by changing the frame duration (10, 20 or 30 ms) or sample rate (8000, 16000, 32000, or 48000).
I'm not sure what you mean by frame_shift
. duration
in that function is really just the frame width in seconds instead of milliseconds.
from py-webrtcvad.
@wiseman frame_shift means the shift between two adjacent frames, e.g. the length of frame is 20ms, and the first frame is from 15ms to 35ms, if the frame_shift is 8ms, then the next frame is from 23ms to 43ms, why do this? Because the wave signal is consecutive, we want to keep the continuity of the original signal and be smooth. So I also wonder why webrtc does's not consider this parameter, thanks!
from py-webrtcvad.
Related Issues (20)
- webrtcvad.Vad() returns True with random noise HOT 1
- Question: Is there a way to filter noise before running VAD? HOT 1
- about transfer learning
- I am having Issue installing webrtcvad i have posted the error code bellow HOT 2
- problem installing on MacOs BigSur 11.4
- A sequence which the value indicates the corresponding sample is to be trimmed or preserved
- [https://drive.google.com/file/d/1ze3PHQtfpzCietKjyRT9Nd1t5jXKqtfS/view?usp=sharing](url) HOT 5
- How can I get the probability of whether this audio is speaking or not
- WEBRTC_ARCH_*, PPC and environment variable? HOT 4
- can't install on macOs Monterey 12.1 (21C52) HOT 2
- Memory leak problem still existed in version 2.0.10 HOT 3
- Help please ran the code and gave an error pip install -r requirements.txt
- Installing error HOT 2
- webrtcvad.Error: Error while processing frame
- multiprocessing bug HOT 1
- I need help HOT 10
- Trouble converting pyAudio Mic input to VAD frames HOT 4
- error: subprocess-exited-with-error while installing with pip HOT 4
- Failed to build webrtcvad when installing a package
- Using microphone detection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-webrtcvad.