Skip to content

speech: add missing import for code sample - #1898

Merged
engelke merged 2 commits into
masterfrom
anguillanneuf-patch-1
Jan 25, 2019
Merged

speech: add missing import for code sample#1898
engelke merged 2 commits into
masterfrom
anguillanneuf-patch-1

Conversation

@anguillanneuf

Copy link
Copy Markdown
Member

No description provided.

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 5, 2018
@anguillanneufanguillanneuf changed the title Add missing import for code samplespeech: add missing import for code sampleDec 5, 2018
def transcribe_file_with_enhanced_model(path):
"""Transcribe the given audio file using an enhanced model."""
# [START speech_transcribe_enhanced_model]
import io

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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. :)

@engelkeengelke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@engelke
engelke merged commit e1050fc into masterJan 25, 2019
@anguillanneuf
anguillanneuf deleted the anguillanneuf-patch-1 branch February 7, 2019 21:52
busunkim96 pushed a commit to busunkim96/python-speech that referenced this pull request Sep 1, 2020
busunkim96 pushed a commit to googleapis/python-speech that referenced this pull request Sep 3, 2020
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 18, 2023
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@anguillanneuf@beccasaurus@engelke@nnegrey@googlebot