Make bool assignment more concise
parent
5694b7f645
commit
ed1deeb259
|
@ -195,10 +195,7 @@ class PreciseHotword(HotWordEngine):
|
||||||
self.cooldown -= 1
|
self.cooldown -= 1
|
||||||
self.has_found = False
|
self.has_found = False
|
||||||
continue
|
continue
|
||||||
if float(line) > 0.5:
|
self.has_found = float(line) > 0.5
|
||||||
self.has_found = True
|
|
||||||
else:
|
|
||||||
self.has_found = False
|
|
||||||
|
|
||||||
def update(self, chunk):
|
def update(self, chunk):
|
||||||
self.proc.stdin.write(chunk)
|
self.proc.stdin.write(chunk)
|
||||||
|
|
Loading…
Reference in New Issue