Skip to content

Commit

Permalink
Fixing speech/api tests (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinjiez authored and Jon Wayne Parrott committed Jul 1, 2016
1 parent 82717de commit c4dff94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions scripts/prepare-testing-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ gcloud preview app deploy -q datastore/api/index.yaml
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/

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"
Binary file added speech/api/resources/audio.flac
Binary file not shown.
4 changes: 2 additions & 2 deletions speech/api/speech_gcs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
reason=("grpc doesn't yet support python3 "
'https://github.com/grpc/grpc/issues/282'))
def test_main(cloud_config, capsys):
input_uri = 'gs://{}/speech/clip.flac'.format(cloud_config.storage_bucket)
output_uri = 'gs://{}/speech/clip.txt'.format(cloud_config.storage_bucket)
input_uri = 'gs://{}/speech/audio.flac'.format(cloud_config.storage_bucket)
output_uri = 'gs://{}/speech/audio.txt'.format(cloud_config.storage_bucket)

main(input_uri, output_uri, 'FLAC', 16000)

Expand Down

0 comments on commit c4dff94

Please sign in to comment.