Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Wrong requirements in samples/*/requirements.txt #79

Closed
zub2 opened this issue Oct 5, 2020 · 1 comment
Closed

Wrong requirements in samples/*/requirements.txt #79

zub2 opened this issue Oct 5, 2020 · 1 comment
Assignees
Labels
api: speech Issues related to the googleapis/python-speech API. samples Issues that are directly related to samples. triage me I really want to be triaged.

Comments

@zub2
Copy link

zub2 commented Oct 5, 2020

The requirements.txt in samples still specify version google-cloud-speech==1.3.2. But the code itself (at least in python-speech/samples/microphone) needs version 2.0.0.

As a result, when one blindly runs pip install -r samples/microphone/requirements.txt and then proceeds to run e.g. samples/microphone/transcribe_streaming_mic.py, the result is:

$ python samples/microphone/transcribe_streaming_mic.py 
Traceback (most recent call last):
  File "samples/microphone/transcribe_streaming_mic.py", line 197, in <module>
    main()
  File "samples/microphone/transcribe_streaming_mic.py", line 172, in main
    config = speech.RecognitionConfig(
AttributeError: module 'google.cloud.speech' has no attribute 'RecognitionConfig'

... which provides a suboptimal "getting started" experience.

Steps to reproduce

  1. virtualenv testenv
  2. . testenv/bin/activate
  3. pip install -r samples/microphone/requirements.txt
  4. python samples/microphone/transcribe_streaming_mic.py

The fix is to install google-cloud-speech==2.0.0 instead of the old 1.3.2.

I think this issue is fixed in #78 but as it's not yet merged and others might run into this (and spend time figuring out what's wrong), I'm creating this issue.

@product-auto-label product-auto-label bot added api: speech Issues related to the googleapis/python-speech API. samples Issues that are directly related to samples. labels Oct 5, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 6, 2020
@b-loved-dreamer b-loved-dreamer self-assigned this Oct 7, 2020
@b-loved-dreamer b-loved-dreamer removed the triage me I really want to be triaged. label Oct 7, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 7, 2020
@b-loved-dreamer
Copy link
Contributor

Hi @zub2, thank you for making note of that. As you noted, we are going thorough the process of updating our samples to reflect the changes in 2.0.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: speech Issues related to the googleapis/python-speech API. samples Issues that are directly related to samples. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants