Potential fix for #7
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.0.4/examples/Vosklet.min.js" async defer></script>
|
||||
<script>
|
||||
async function start(spkModel = false) {
|
||||
async function start() {
|
||||
// Make sure sample rate matches that in the training data
|
||||
let ctx = new AudioContext({sampleRate : 16000})
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.0.4/examples/Vosklet.min.js" async defer></script>
|
||||
<script>
|
||||
async function start(spkModel = false) {
|
||||
async function start() {
|
||||
// Make sure sample rate matches that in the training data
|
||||
let ctx = new AudioContext({sampleRate : 16000})
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ let processorURL = URL.createObjectURL(new Blob(['(', (() => {
|
||||
this.buffer = new Float32Array(this.maxCount * 128)
|
||||
}
|
||||
process(inputs) {
|
||||
if(!inputs[0][0]) return true
|
||||
this.buffer.set(inputs[0][0], this.count * 128)
|
||||
this.count++
|
||||
if(this.count >= this.maxCount) {
|
||||
|
||||
Reference in New Issue
Block a user