-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Speech transcribe async bug #688
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
Changes from 7 commits
8a7355e
0a3878e
e4c1f71
695cd78
d3fee87
111eb09
6f6134b
fb9d2b6
bcbe0ab
2322792
01a1603
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,8 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -e | ||
|
|
||
| GCLOUD_PROJECT=$(gcloud config list project --format="value(core.project)" 2>/dev/null) | ||
|
|
||
| echo "Configuring project $GCLOUD_PROJECT for system tests." | ||
|
|
@@ -44,7 +46,7 @@ echo "Creating pubsub resources." | |
| gcloud alpha pubsub topics create gae-mvm-pubsub-topic | ||
|
|
||
| echo "Creating speech resources." | ||
| gsutil cp speech/api/resources/audio.flac gs://$GCLOUD_PROJECT/speech/ | ||
| gsutil cp speech/api-client/resources/audio.raw gs://$GCLOUD_PROJECT/speech/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there other tests that depend on audio.flac?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just searched through the repo and it doesn't look like there are. Also, the audio.flac file doesn't exist in that directory anymore.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (doesn't have to be in this CL - just saying it'd probably be a good idea..)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed in this PR |
||
|
|
||
| echo "To finish setup, follow this link to enable APIs." | ||
| echo "https://console.cloud.google.com/flows/enableapi?project=${GCLOUD_PROJECT}&apiid=bigtable.googleapis.com,bigtableadmin.googleapis.com,bigquery,cloudmonitoring,compute_component,datastore,datastore.googleapis.com,dataproc,dns,plus,pubsub,logging,storage_api,vision.googleapis.com" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Copyright 2016, Google, Inc. | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| import re | ||
|
|
||
| from transcribe_async import main | ||
|
|
||
|
|
||
| def test_main(resource, capsys, cloud_config): | ||
|
|
||
| # Run the transcribe sample on audio.raw, verify correct results | ||
| main(cloud_config.speech_storage_uri, 'LINEAR16', 16000) | ||
| out, err = capsys.readouterr() | ||
| assert re.search(r'how old is the Brooklyn Bridge', out, re.DOTALL | re.I) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Copyright 2016, Google, Inc. | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| import re | ||
|
|
||
| from transcribe import main | ||
|
|
||
|
|
||
| def test_main(resource, capsys, cloud_config): | ||
|
|
||
| # Run the transcribe sample on audio.raw, verify correct results | ||
| main(cloud_config.speech_storage_uri, 'LINEAR16', 16000) | ||
| out, err = capsys.readouterr() | ||
| assert re.search(r'how old is the Brooklyn Bridge', out, re.DOTALL | re.I) |
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.
@ryanmats there's already the
storage_bucketthing here, there isn't any need to add another one.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.
fixed