Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log.py and implemented logging functionality #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added log.py and implemented logging functionality #20

wants to merge 1 commit into from

Conversation

quepayal
Copy link

@quepayal quepayal commented Apr 8, 2018

No description provided.

def setup_custom_logger(name):
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%(message)s')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length exceeds 79. Pep8 violation 😸


while True: # STT Loop
audio = recognizer.listen(source) # listen from mic

try:
text = recognizer.recognize_google(audio) # recognize with google
logging.info("You said:")
logging.info(text)
logger.info("You said:")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concatenate You said with the text.

@ankitxjoshi
Copy link
Member

ankitxjoshi commented Apr 8, 2018

Not necessary but FYI short-log should be in present imperative tense and not in past tense. Plus adding a link to the issue the PR is referencing is also a good practice.

@quepayal
Copy link
Author

quepayal commented Apr 9, 2018

Ok sir , will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants