Nothing is working but it is on the right track! ASYNCIFY removed, manual waiting instead and some proxying logic
This commit is contained in:
28
index.html
Normal file
28
index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="BrowserRecognizer.js"></script>
|
||||
</head>
|
||||
<script>
|
||||
const BrRec = await loadBR()
|
||||
const model = await BrRec.makeModel("test/model.tzst")
|
||||
const recognizer = await BrRec.makeRecognizer(model)
|
||||
recognizer.addEventListener("result", e => {
|
||||
console.log("Result: ",e.details)
|
||||
})
|
||||
recognizer.addEventListener("partialResult", e => {
|
||||
console.log("Partial result: ",e.details)
|
||||
})
|
||||
let ctx = new AudioContext()
|
||||
media = await navigator.mediaDevices.getUserMedia({
|
||||
video: false,
|
||||
audio: {
|
||||
echoCancellation: true,
|
||||
noiseSuppression: true,
|
||||
channelCount: 1,
|
||||
sampleRate: 16000
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user