User Manual
44
from pismart.pismart import PiSmart
p = PiSmart()
stt = STT('dictionary', name_calling=True, timeout=10.0, dictionary_update=True)
p.speaker_volume(100)
is_awake
Whether to be awakened. If it's awakened by its name, return True. Need to open
name_calling when the object is created.
if stt.is_awake: # need name_calling True
xxxx
heard
If some speech is heard, return True.
if stt.heard: # if heard do something
xxxx
recognize()
Enter the process of speech recognition. No parameters, no values returned.
while True:
stt.recognize() # begin recognize
update_dictionary()
Update the dictionary file. No parameters, return the value 0.
stt.update_dictionary() # update dictionary
end()
End the process of speech recognition.No parameters, no values returned.
stt.end()
An instance:
from pismart.pismart import PiSmart
SunFounder