Spaces:
Runtime error
Runtime error
davidscripka
commited on
Commit
·
8e966ac
1
Parent(s):
42fc253
Updates for latest version of openWakeWord
Browse files
app.py
CHANGED
@@ -5,10 +5,14 @@ import collections
|
|
5 |
import scipy.signal
|
6 |
import numpy as np
|
7 |
from functools import partial
|
|
|
8 |
from openwakeword.model import Model
|
9 |
|
|
|
|
|
|
|
10 |
# Load openWakeWord models
|
11 |
-
model = Model()
|
12 |
|
13 |
# Define function to process audio
|
14 |
def process_audio(audio, state=collections.defaultdict(partial(collections.deque, maxlen=60))):
|
|
|
5 |
import scipy.signal
|
6 |
import numpy as np
|
7 |
from functools import partial
|
8 |
+
import openwakeword
|
9 |
from openwakeword.model import Model
|
10 |
|
11 |
+
# Download models
|
12 |
+
openwakeword.utils.download_models()
|
13 |
+
|
14 |
# Load openWakeWord models
|
15 |
+
model = Model(inference_framework="onnx")
|
16 |
|
17 |
# Define function to process audio
|
18 |
def process_audio(audio, state=collections.defaultdict(partial(collections.deque, maxlen=60))):
|