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

enableWordTimeOffsets = true not working for streamingRecognize #15

Closed
bloodcarter opened this issue Jan 16, 2018 · 6 comments
Closed
Assignees
Labels
api: speech Issues related to the googleapis/nodejs-speech API. type: question Request for information or clarification. Not an issue.

Comments

@bloodcarter
Copy link

enableWordTimeOffsets option yelds empty "words" array at least for streamingRecognize and al least for Russian.

Env:

  • OS: Linux ip-172-31-16-252 4.9.62-21.56.amzn1.x86_64 Lint all the things #1 SMP Thu Nov 16 05:37:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Node.js version: v7.2.1
  • npm version: 3.10.10
  • google-cloud-node version: @google-cloud/speech@0.10.3

Code:

var recognizeStream = Speech.streamingRecognize(
    {
      config: {
        enableWordTimeOffsets: true,
        encoding: self.inputFormat.encoding,
        sampleRateHertz: self.inputFormat.sampleRate,
        languageCode: "ru-RU"
      },
      singleUtterance: false,
      interimResults: true
    }
  );

recognizeStream.on('data', (data)=>{...});
@stephenplusplus stephenplusplus added type: question Request for information or clarification. Not an issue. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 16, 2018
@stephenplusplus
Copy link
Contributor

Would you be able to put together a small repo with a sample audio file, that allows us to clone, run, and see the failure?

@bloodcarter
Copy link
Author

@stephenplusplus looks like it works, but only after isFinal is set to true. Is that a bug? What if I need words boundaries immediatedly while getting interim results?

@stephenplusplus
Copy link
Contributor

Unfortunately, I don't have many answers about how to use the upstream API. We are a very thin layer. You can get in touch with more experienced users / developers through one of the methods mentioned here: https://cloud.google.com/speech/docs/support

Sorry that I couldn't be more help on this one.

@ghost ghost removed the priority: p2 Moderately-important priority. Fix may not be included in next release. label Jan 17, 2018
@google-cloud-label-sync google-cloud-label-sync bot added the api: speech Issues related to the googleapis/nodejs-speech API. label Jan 31, 2020
@jinyeng
Copy link

jinyeng commented Feb 7, 2020

This issue is still happening. Any plans on fixing ?

image

@HMLarsen
Copy link

Any answers in 2021?

@pomelio
Copy link

pomelio commented Mar 6, 2022

Still not working

info: transcript: {"callsid":"CAe280196639afed68c298bbc8b27530c7","content":"{"results":[{"alternatives":[{"words":[],"transcript":"Good morning. How are you? I'm fine. And you","confidence":0}],"isFinal":false,"stability":0.8999999761581421,"resultEndTime":{"seconds":"8","nanos":390000000},"channelTag":0,"languageCode":"en-us"},{"alternatives":[{"words":[],"transcript":" want to","confidence":0}],"isFinal":false,"stability":0.009999999776482582,"resultEndTime":{"seconds":"8","nanos":390000000},"channelTag":0,"languageCode":"en-us"}],"error":null,"speechEventType":"SPEECH_EVENT_UNSPECIFIED","totalBilledTime":null}","createTime":1646557832403,"text":"Good morning. How are you? I'm fine. And you","timestamp":"2022-03-06 09:10:32","track":"inbound"}

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/nodejs-speech API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

5 participants