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

A Question: encodeWav sample Rate #16

Open
tomanwalker opened this issue Mar 1, 2021 · 2 comments
Open

A Question: encodeWav sample Rate #16

tomanwalker opened this issue Mar 1, 2021 · 2 comments

Comments

@tomanwalker
Copy link

Do you know, how to reduce file size, ie by dropping quality.
When I put SampleRate from 44100 to e.g. 16000 - the sound is Slower/Tuned downed.

Is there a way to create lower quality / small file?

@daaain
Copy link
Owner

daaain commented Mar 12, 2021

How did you try to change the sample rate?

The sampleRate variable used in a fair few places and the WAV encoder is pretty low level, so might need to tweak the code in a few places: https://github.com/daaain/JSSoundRecorder/search?q=sampleRate

@tomanwalker
Copy link
Author

in the File "js/lib/recorder.js"

worker.postMessage({
      command: 'init',
      config: {
        sampleRate: 16000 /// this.context.sampleRate;
      }
    });

sampleRate: this.context.sampleRate

For the reference, my context is printed as 48k

recorder - init - target Rate = 16000 | context = 48000

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