GithubHelp home page GithubHelp logo

Comments (9)

jehoshua7 avatar jehoshua7 commented on May 13, 2024 2

@manbharae - I remembered I had a permission error when installing, but this fixed it

pip3 install --user webrtcvad

and then to run it, set the aggressive mode and specify filename

python3 example.py 0 output.wav

for agressive mode of 0, and

python3 example.py 1 output.wav

for agressive mode of 1, etc.

from py-webrtcvad.

jehoshua7 avatar jehoshua7 commented on May 13, 2024 2

how does it know where to find test.wav to process?

It's all relative. If your file test.wav is in the current path, it is

python3 example.py 1 test.wav

If your file test.wav is in some other path, it is

python3 example.py 1 ~/someotherpath/output.wav

from py-webrtcvad.

manbharae avatar manbharae commented on May 13, 2024 1

@jehoshua7 Could you tell how to process a .wav/.mp3 using py-webrtcvad?
i.e After doing pip install py-webrtcvad what do I do?

from py-webrtcvad.

manbharae avatar manbharae commented on May 13, 2024

I too had the installation issue. your suggestion of --user tag helped! Thank you very much for pointing it 👍 .

Question:
say my file is name test.wav
in the python3 example.py 1 output.wav how does it know where to find test.wav to process?

from py-webrtcvad.

wiseman avatar wiseman commented on May 13, 2024

example.py is just meant to show you how to write code that uses the VAD, not be a full-featured application. But you could try changing line 150 to use a smaller time window. Instead of

segments = vad_collector(sample_rate, 30, 300, vad, frames)

try this, which changes the time window from 300 ms to 100 ms:

segments = vad_collector(sample_rate, 30, 100, vad, frames)

from py-webrtcvad.

jehoshua7 avatar jehoshua7 commented on May 13, 2024

@wiseman Yes, thanks John, that was the line I was looking at last night. So, good timing, thanks. :)

from py-webrtcvad.

sagar2226 avatar sagar2226 commented on May 13, 2024

@jehoshua7 how can i get audio chunks size no more than 9 seconds?

from py-webrtcvad.

sagar2226 avatar sagar2226 commented on May 13, 2024

@wiseman Yes, thanks John, that was the line I was looking at last night. So, good timing, thanks. :)

@jehoshua7 how can i get audio chunks size no more than 9 seconds?
i got it in this way.. my chunks wont be no more than 9 seconds now
if len(voiced_frames) > 300:
sys.stdout.write('-(%s)' % (frame.timestamp + frame.duration))
end.append(frame.timestamp + frame.duration)
triggered = False
yield b''.join([f.bytes for f in voiced_frames])
ring_buffer.clear()
voiced_frames = []

from py-webrtcvad.

sagar2226 avatar sagar2226 commented on May 13, 2024

@wiseman Yes, thanks John, that was the line I was looking at last night. So, good timing, thanks. :)

@jehoshua7 how can i get audio chunks size no more than 9 seconds?
i got it in this way.. my chunks wont be no more than 9 seconds now
Update in the else part of vad collector
if len(voiced_frames) > 300:
sys.stdout.write('-(%s)' % (frame.timestamp + frame.duration))
end.append(frame.timestamp + frame.duration)
triggered = False
yield b''.join([f.bytes for f in voiced_frames])
ring_buffer.clear()
voiced_frames = []
this code will be followed by elif num_voiced>0.9
*****************
*****************

from py-webrtcvad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.