GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python Async dumps problem Speech API · Issue #588 · GoogleCloudPlatform/python-docs-samples

Python Async dumps problem Speech API #588

New issue
Copy link
New issue
Copy link
Closed
Closed
Python Async dumps problem Speech API#588
Copy link
Assignees
puneith
Labels
ML

Description

@Dellax8
Dellax8
opened on Oct 18, 2016
Issue body actions

Hi,
with the transcribe_async.py file i can't get my results back.
The only changes that i made in transcribe_async.py are:

  • Language
  • Raw file passed by uri.

The error is in print(json.dumps(response['response']['results']))
Python says that the error is the Key 'results'

I try to fix it, but i can't understand what is wrong in this program.
I hope you can help me.

Thanks

Activity

  1. theacodes
    assigned
    puneith
    on Oct 18, 2016
  2. theacodes
    added
    ML
    on Oct 18, 2016
  3. theacodes commented on Oct 18, 2016

    @theacodes
    theacodes
    on Oct 18, 2016
    Contributor
    More actions

    Hi @Dellax8 , can you try changing that line to print(json.dumps(response)) and sending us the output?

  4. puneith commented on Oct 18, 2016

    @puneith
    puneith
    on Oct 18, 2016
    Contributor
    More actions

    @Dellax8 Do you mean rest or grpc transcribe_async.py? Also can you let us know what language you changed it to?

  5. Dellax8 commented on Oct 19, 2016

    @Dellax8
    Dellax8
    on Oct 19, 2016
    Author
    More actions

    @jonparrott
    {"done": true, "metadata": {"lastUpdateTime": "2016-10-18T15:46:35.033374Z", "progressPercent": 100, "startTime": "2016-10-18T15:46:28.054832Z", "@type": "type.googleapis.com/google.cloud.speech.v1beta1.AsyncRecognizeMetadata"}, "name": "#NAME#", "response": {"@type": "type.googleapis.com/google.cloud.speech.v1beta1.AsyncRecognizeResponse"}}

    @puneith
    I Try with REST. Now i Try with grpc but i can't' understand what is wrong.
    The language is it-IT but i think that this is not the problem.

  6. Dellax8 commented on Oct 19, 2016

    @Dellax8
    Dellax8
    on Oct 19, 2016
    Author
    More actions

    with grpc transcribe_async.py i can't compile.

    there are errors in "
    from google.cloud.credentials import get_credentials
    from google.cloud.speech.v1beta1 import cloud_speech_pb2
    from google.longrunning import operations_grpc_pb2
    from grpc.beta import implementations"

    the errors are in the import part.
    I have installed the requirements by pip, but it's not working yet

  7. puneith commented on Oct 19, 2016

    @puneith
    puneith
    on Oct 19, 2016
    Contributor
    More actions

    @Dellax8 Can you paste the error you are getting?

  8. Dellax8 commented on Oct 20, 2016

    @Dellax8
    Dellax8
    on Oct 20, 2016
    Author
    More actions

    @puneith

    in grpc - i fix the import error, but the result is empty...
    in REST -
    print(json.dumps(response['response']['results']))
    KeyError: 'results'

  9. Dellax8
    closed this as completedon Oct 20, 2016
  10. Dellax8
    reopened this on Oct 20, 2016
  11. puneith commented on Oct 20, 2016

    @puneith
    puneith
    on Oct 20, 2016
    Contributor
    More actions

    Can you send me the audio file if you don't mind.

  12. Dellax8 commented on Oct 20, 2016

    @Dellax8
    Dellax8
    on Oct 20, 2016
    Author
    More actions

    the encoding was wrong
    I create a new file but it doesn't work

    This is the audio Raw File

    teone2.zip

  13. jerjou commented on Oct 21, 2016

    @jerjou
    jerjou
    on Oct 21, 2016
    Contributor
    More actions

    Hello - note that if you have encoded the file with different parameters than the sample one, you'll have to change the configuration parameters you send to the API. In this case, it looks like your audio file was encoded with a sample rate near 32000, which means you'll have to change the sampleRate parameter to match.

    I was able to get at least a partial result from the API after changing the sampleRate and language parameters, though I wasn't able to verify since I don't speak italian :) Anyway, based on that I believe this should resolve this issue - please reopen this issue if it doesn't!

  14. jerjou
    closed this as completedon Oct 21, 2016
  15. Linchin
    added a commit that references this issue on Aug 18, 2025

    chore(deps): update all dependencies (#588)

    d2e4564
  16. glasnt
    added a commit that references this issue on Sep 16, 2025

    chore: migrate handwritten samples from googleapis/python-bigquery-st…

    dada3ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @puneith
    puneith

Labels

ML

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.