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 — [cloud speech] the right way to get a transcript from operation? base64 decode!? · Issue #2312 · googleapis/google-cloud-node

[cloud speech] the right way to get a transcript from operation? base64 decode!? #2312

New issue
Copy link
New issue
Copy link
Closed
Closed
[cloud speech] the right way to get a transcript from operation? base64 decode!?#2312
Copy link
Assignees
bcoe
Labels
api: speechIssues related to the Speech-to-Text API.priority: p2Moderately-important priority. Fix may not be included in next release.

Description

@mfkenson
mfkenson
opened on May 16, 2017
Issue body actions

screen shot 2017-05-16 at 9 58 40 pm

Though I couldn't find the usage of operation reference to get a transcript result.
I found something similar by base64-decoding operation.metadata.response.value..

The strange thing is I got some special characters after decoding the value.
Could you share the the right way to get a transcript from operation?

var operation = speechClient.operation('68850831366825');
operation.get({},function(err,res){
              if (err){
                  console.log(err);
                  return;
              }
              var metadata = res.metadata;
              var isDone = metadata.done;
              if (isDone && metadata.response) {
                  var b64string = metadata.response.value;
                  var buf = new Buffer(b64string, 'base64');
                  var transcript = buf.toString('utf8');
                  .....
             }
Reacted by Maxime Liron

Activity

  1. stephenplusplus
    added
    api: speechIssues related to the Speech-to-Text API.
    on May 17, 2017
  2. stephenplusplus commented on May 17, 2017

    @stephenplusplus
    stephenplusplus
    on May 17, 2017
    Contributor
    More actions

    Just confirming the use case-- you are trying to get the transcript from a recognition request that was run in another process at another time?

    Reacted by Kenson Leung W.K and Maxime Liron
  3. mfkenson commented on May 18, 2017

    @mfkenson
    mfkenson
    on May 18, 2017
    Author
    More actions

    @stephenplusplus Yes. thats what I am trying to do.

  4. stephenplusplus
    added
    type: enhancement
    on May 18, 2017
  5. stephenplusplus commented on May 18, 2017

    @stephenplusplus
    stephenplusplus
    on May 18, 2017
    Contributor
    More actions

    Thanks. We haven't designed an ideal solution for this, so the way you've been doing it would be the most correct. Off hand, I'm not sure what a good API would look like for this, so feel free to make suggestions / send a PR!

  6. stephenplusplus commented on Jun 12, 2017

    @stephenplusplus
    stephenplusplus
    on Jun 12, 2017
    Contributor
    More actions

    @lukesneeringer since Speech is about to go through the same process as Vision Partial Veneer, is this feature request relevant?

  7. ximus commented on Jun 25, 2017

    @ximus
    ximus
    on Jun 25, 2017
    More actions

    as a followup to to @mfkenson's snippet in the issue summary:

    the base64 string found at metadata.response.value isn't usable data. It is the protocol buffers representation of the results. To get the result data, I am doing the following contortion to get useful data:

    ...
    const results = speechClient.api.Speech.longrunningDescriptors.longRunningRecognize.responseDecoder(metadata.response.value).results
    const result = map(results, r => r.alternatives[0].transcript).join('')

    there may be a pretty way of doing this, but i've invested enough time in this for now.
    This remains brittle solution as it relies on a deeply nested private API.

    I find this public speechClient.operation rather useless in its current form and its presence on the public API more misleading than helpful as I couldn't find a public way of doing anything useful with the result set. Did I miss something? I certainly couldn't find any doc or examples showing me better.

    I recommend you consider either deprecating it, augmenting it or putting a prominent warning about its limited use in the doc

    Reacted by Tema Smirnov
    Reacted by Tema Smirnov
  8. ximus commented on Jun 25, 2017

    @ximus
    ximus
    on Jun 25, 2017
    More actions

    I'd like to note that the use case it caters to (startRecognition in one process, poll for results in another) is an important use-case in my opinion.
    Longer audio files can take real long to process by the speech API. I'm using Cloud Functions to startRecognition and I can't afford to have a function sit around waiting for the promise to resolve. Also, I just run into the max runtime quota for those and the function instance is forcibly terminated.

    Reacted by Kenson Leung W.K, Tema Smirnov and Mirek Krymski
  9. mfkenson commented on Jun 30, 2017

    @mfkenson
    mfkenson
    on Jun 30, 2017
    Author
    More actions

    @ximus Even I could afford to sit and wait, there will be timeout exception (grpc)

  10. evaogbe
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Aug 7, 2017
  11. landrito
    added
    status: acknowledged
    on Aug 7, 2017
  12. evaogbe commented on Aug 8, 2017

    @evaogbe
    evaogbe
    on Aug 8, 2017
    Contributor
    More actions

    Hi @mfkenson,
    Thank you for reporting this.

    Since the time that you reported this issue, we released an entirely new version of google-cloud-speech with significant alterations. Could you upgrade to the newest version (note that code changes will be necessary to use the new thing; your existing code will use the former, now deprecated code path), and it should fix this problem for you.

    I am going to close this, but feel free to re-open if the issue persists.

  13. evaogbe
    closed this as completedon Aug 8, 2017
  14. JustinBeckwith
    assigned
    evaogbe
    on Feb 1, 2021
  15. evaogbe commented on Feb 2, 2021

    @evaogbe
    evaogbe
    on Feb 2, 2021
    Contributor
    More actions

    I am no longer on the team

  16. evaogbe
    removed their assignment
    on Feb 2, 2021
  17. JustinBeckwith
    assigned
    bcoe
    on Feb 2, 2021
  18. sofisl
    added 3 commits that reference this issue on Feb 25, 2026

    chore: call non-hermetic functions since we're installing node_module…

    e53a376

    feat: track precommit token in r/w apis(multiplexed session) (#2312)

    195b407

    chore(main): release 8.1.0 (#2305)

    f3bd153
  19. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore: call non-hermetic functions since we're installing node_module…

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

Metadata

Metadata

Assignees

  • @bcoe
    bcoe

Labels

api: speechIssues related to the Speech-to-Text API.priority: p2Moderately-important priority. Fix may not be included in next release.

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.