Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions VoiceAssistant/Project_Basic_struct/speakListen.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ def hear():
[str]: [Speech of user as a string in English(en - IN)]
"""
r = sr.Recognizer()
"""Reconizer is a class which has lot of functions related to Speech i/p and o/p.
"""Recognizer is a class which has lot of functions related to Speech i/p and o/p.
"""
r.pause_threshold = (
1 # a pause of more than 1 second will stop the microphone temporarily
)
r.energy_threshold = 300 # python by default sets it to 300. It is the minimum input energy to be considered.
r.dynamic_energy_threshold = (
True # pyhton now can dynamically change the threshold energy
True # python now can dynamically change the threshold energy
)

with sr.Microphone() as source:
Expand Down Expand Up @@ -102,14 +102,14 @@ def long_hear(duration_time=60):
[str]: [Speech of user as a string in English(en - IN)]
"""
r = sr.Recognizer()
"""Reconizer is a class which has lot of functions related to Speech i/p and o/p.
"""Recognizer is a class which has lot of functions related to Speech i/p and o/p.
"""
r.pause_threshold = (
1 # a pause of more than 1 second will stop the microphone temporarily
)
r.energy_threshold = 300 # python by default sets it to 300. It is the minimum input energy to be considered.
r.dynamic_energy_threshold = (
True # pyhton now can dynamically change the threshold energy
True # python now can dynamically change the threshold energy
)

with sr.Microphone() as source:
Expand Down Expand Up @@ -141,14 +141,14 @@ def short_hear(duration_time=5):
[str]: [Speech of user as a string in English(en - IN)]
"""
r = sr.Recognizer()
"""Reconizer is a class which has lot of functions related to Speech i/p and o/p.
"""Recognizer is a class which has lot of functions related to Speech i/p and o/p.
"""
r.pause_threshold = (
1 # a pause of more than 1 second will stop the microphone temporarily
)
r.energy_threshold = 300 # python by default sets it to 300. It is the minimum input energy to be considered.
r.dynamic_energy_threshold = (
True # pyhton now can dynamically change the threshold energy
True # python now can dynamically change the threshold energy
)

with sr.Microphone() as source:
Expand Down
Loading