-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
speech: add missing import for code sample #1898
Conversation
@@ -28,7 +28,10 @@ | |||
def transcribe_file_with_enhanced_model(path): | |||
"""Transcribe the given audio file using an enhanced model.""" | |||
# [START speech_transcribe_enhanced_model] | |||
import io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import exists at the top of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beccasaurus Should we also move standard imports inside the functions for imports or just leave them outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ones like IO for reading files are 👍 – folks will find it helpful so things don't blow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. @anguillanneuf
I'd say we should just make sure we remove the import above then and replace it inside the function where needed. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.