Merge pull request #2131 from MycroftAI/revert-2124-feature/upgrade-precise
Revert "Support chopping old audio via precise upgrade"pull/2132/head
commit
87aace4dd8
|
@ -121,8 +121,6 @@ class PocketsphinxHotWord(HotWordEngine):
|
||||||
|
|
||||||
|
|
||||||
class PreciseHotword(HotWordEngine):
|
class PreciseHotword(HotWordEngine):
|
||||||
CHUNK_SIZE = 2048
|
|
||||||
|
|
||||||
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"):
|
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"):
|
||||||
super(PreciseHotword, self).__init__(key_phrase, config, lang)
|
super(PreciseHotword, self).__init__(key_phrase, config, lang)
|
||||||
from precise_runner import (
|
from precise_runner import (
|
||||||
|
@ -150,7 +148,7 @@ class PreciseHotword(HotWordEngine):
|
||||||
).replace('.tar.gz', '.pb')
|
).replace('.tar.gz', '.pb')
|
||||||
|
|
||||||
self.has_found = False
|
self.has_found = False
|
||||||
self.stream = ReadWriteStream(chop_samples=self.CHUNK_SIZE * 3)
|
self.stream = ReadWriteStream()
|
||||||
|
|
||||||
def on_activation():
|
def on_activation():
|
||||||
self.has_found = True
|
self.has_found = True
|
||||||
|
@ -159,7 +157,7 @@ class PreciseHotword(HotWordEngine):
|
||||||
sensitivity = self.config.get('sensitivity', 0.5)
|
sensitivity = self.config.get('sensitivity', 0.5)
|
||||||
|
|
||||||
self.runner = PreciseRunner(
|
self.runner = PreciseRunner(
|
||||||
PreciseEngine(precise_exe, self.precise_model, self.CHUNK_SIZE),
|
PreciseEngine(precise_exe, self.precise_model),
|
||||||
trigger_level, sensitivity,
|
trigger_level, sensitivity,
|
||||||
stream=self.stream, on_activation=on_activation,
|
stream=self.stream, on_activation=on_activation,
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,7 +29,7 @@ adapt-parser==0.3.2
|
||||||
padatious==0.4.6
|
padatious==0.4.6
|
||||||
fann2==1.0.7
|
fann2==1.0.7
|
||||||
padaos==0.1.9
|
padaos==0.1.9
|
||||||
precise-runner==0.3.1
|
precise-runner==0.2.1
|
||||||
petact==0.1.2
|
petact==0.1.2
|
||||||
|
|
||||||
# dev setup tools
|
# dev setup tools
|
||||||
|
|
Loading…
Reference in New Issue