nodejs-speech | js client for Google Cloud Speech | Speech library

 by   googleapis TypeScript Version: v5.2.0 License: Apache-2.0

kandi X-RAY | nodejs-speech Summary

kandi X-RAY | nodejs-speech Summary

nodejs-speech is a TypeScript library typically used in Artificial Intelligence, Speech, Nodejs applications. nodejs-speech has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Cloud Speech Client Library for Node.js. A comprehensive list of changes in each version may be found in the CHANGELOG. Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nodejs-speech has a low active ecosystem.
              It has 683 star(s) with 300 fork(s). There are 70 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 246 have been closed. On average issues are closed in 98 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of nodejs-speech is v5.2.0

            kandi-Quality Quality

              nodejs-speech has no bugs reported.

            kandi-Security Security

              nodejs-speech has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              nodejs-speech is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              nodejs-speech releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nodejs-speech
            Get all kandi verified functions for this library.

            nodejs-speech Key Features

            No Key Features are available at this moment for nodejs-speech.

            nodejs-speech Examples and Code Snippets

            Google cloud speech api javascript/angular
            JavaScriptdot img1Lines of Code : 2dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save @google-cloud/speech
            

            Community Discussions

            QUESTION

            Do time offsets work during streaming audio transcriptions with Google Speech-To-Text?
            Asked 2020-Nov-11 at 21:40

            Time offsets for streaming audio transcriptions through Google Speech-To-Text are not working for me. My configuration looks like this:

            ...

            ANSWER

            Answered 2020-Nov-11 at 21:40

            The preponderance of evidence suggests that time offsets for words transcribed through Google Speech-To-Text are returned only when the bit is_final is True.

            Said another way, timestamped word-boundaries for real-time transcriptions appear only to be available at the end of the transcription.

            I know I am not the only API consumer out there asking for this feature. I can't imagine this is hard to do, and I suspect the fix would not break the current API.

            Source https://stackoverflow.com/questions/64617099

            QUESTION

            How to end Google Speech-to-Text streamingRecognize gracefully and get back the pending text results?
            Asked 2020-Nov-03 at 02:48

            I'd like to be able to end a Google speech-to-text stream (created with streamingRecognize), and get back the pending SR (speech recognition) results.

            In a nutshell, the relevant Node.js code:

            ...

            ANSWER

            Answered 2020-Nov-02 at 02:03

            This: "I'm looking for a potential workaround." - have you considered extending from SpeechClient as a base class? I don't have credential to test, but you can extend from SpeechClient with your own class and then call the internal close() method as needed. The close() method shuts down the SpeechClient and resolves the outstanding Promise.

            Alternatively you could also Proxy the SpeechClient() and intercept/respond as needed. But since your intent is to shut it down, the below option might be your workaround.

            Source https://stackoverflow.com/questions/64565542

            QUESTION

            Google Meet: WebRTC peer-to-peer and Speech to Text
            Asked 2020-Mar-27 at 07:49

            I was in a meeting on Google Meet and saw that you could turn on real time subtitles. They've actually got a demo here on how realtime speech to text can be done, so that bit doesn't confuse me.

            I had also been wanting to experiment with WebRTC (which I believe GoogleMeet uses) just to see its capabilities - e.g. the ability to share a screen without any additional screens.

            However, I've always been under the impression that a WebRTC video/audio stream is client peer-to-peer. The questions I have therefore are

            • How then are Google able to send the audio stream off to a server for analysis?
            • Is it possible to send the audio stream to the client as well as to a server?
            • Would you have to create two of the same audio stream (i don't know if this is even possible), send one over WebRTC to the other peer(s) and the other to a server for analysis?

            How do they achieve this - and if they don't use WebRTC, is it possible to achieve this with WebRTC?

            ...

            ANSWER

            Answered 2020-Mar-27 at 07:49

            Google Meet is using WebRTC. The "peer" in that case is a server, not a browser. While six years old and some details have changed, much of this old article is still true. From the server Google can do audio processing.

            This video describes the architecture required for speech-to-text (and actually translation + text-to-speech again).

            Source https://stackoverflow.com/questions/60876320

            QUESTION

            How to proceed multiple streamingRecognize request in Google Speech-to-Text API?
            Asked 2020-Feb-28 at 05:15

            I have built a web based Speech-to-Text application with Google Speech-to-Text API.

            The application flow:

            1. Get audio stream from browser
            2. Stream audio data to a speech recognition service and get real time results as our user talks

            I have referenced the sample code in my application, the streamingRecognize request works perfectly with a signal client call, and my server can receive the interim-transcription result from Google Speech API. However, when there are more then one client call streamingRecognize simultaneously, Google Speech API will get stuck. So, may I know how to handle more than one streamingRecognize request concurrently? Do I need to create another client to process the second streamingRecognize request? Thanks.

            Back-end server specifications:

            • NodeJS
            • Socket.io
            ...

            ANSWER

            Answered 2020-Feb-27 at 19:47

            Trying to do same, and meeting same troubles as you, or they stop working, or just one client works time to time and other giving strange results, sometimes both, looks like you have single buffer for your main account, have you tried generating api/tokens for each user? Does it worth it, or still there will be same buffer

            Source https://stackoverflow.com/questions/60302995

            QUESTION

            How to fix "Here is no default audio device configured" speech-to-text
            Asked 2019-Nov-05 at 16:24

            Am trying to call the speech-to-text api of google console for nodejs and apparently is working, but when i try to run the example provider for here the example node MicrophoneStream.js and doing the installation like this here, am having the following error.

            STDERR: sox FAIL sox: Sorry, there is no default audio device configured

            i dont really know how to pass the device with arguments and i assuming is the default microphone but not sure cause in some page i found a possible value for this like "AUDIOWAVE", also configured in my system and still not working.

            the recorder object have a function record and i can start the recorder from that passing arguments ( i suppose are passed to sox binaries ), like this

            ...

            ANSWER

            Answered 2019-Nov-05 at 16:24

            Well i see the question dont get any answer, but i apologize because i found a solution few months ago.

            In resumen the version 14.4.2 of sox have some issues in my windows 10 OS, (i test in linux version with fedora 30.1 distribution and works correctly), so i found a solution in the node-speakable repo, just downgrading the version to 14.4.1.

            I solved this problem by installing sox 14.4.1 rather than 14.4.2 (here)

            i solved this problem in the same way.

            anyway (there) is another way in the same post who can solved with the version 14.4.2, but i think is a little tricky cause you play with the command and not implement the library or scripts files but is still a option.

            Source https://stackoverflow.com/questions/57213203

            QUESTION

            Quota exceeded for quota metric 'speech.googleapis.com/default_requests' not really understandable
            Asked 2019-Jun-11 at 07:10

            I'm currently playing with a GCP service called API Speech-to-Text, using the NodeJS client library. For that, I followed the quickstart documentation, trying to recognize a short local audio file (quite simply) first. However, I keep getting this error when I run node test_sample.js :

            ...

            ANSWER

            Answered 2019-Jun-11 at 07:10

            You noted that the project number isn't the same as the one you're seeing the error result, so that seems to be the bigger problem here... The Google Cloud client libraries get the project information and credentials from a few different places (with different priorities for each), so it's possible that you're accidentally picking up credentials and identity from the application defaults (possible the gcloud command-line tool). Can you update the question with the code you're running to get this error?

            There are a few ways to fix an issue like this, but the easiest is probably to just run: gcloud auth application-default login in the command line (documentation).

            Once you follow the authentication flow, you should end up with credentials for the intended project.

            You also might want to take a look at the Getting Started with Authentication guide for GCP in Node.js which talks about creating a service account and setting those credentials using an environment variable.

            Source https://stackoverflow.com/questions/56345685

            QUESTION

            Terminate Google Speech-To-Text streamingRecoginze() RPC call from client side(Node.js SDK)
            Asked 2018-Dec-12 at 10:41

            Is there a way to terminate Google STT streamingRecognize() RPC call from client side? I am using NodeJS library and node-audiorecorder to achive streaming from the Mic.

            Also, how do you handle the network unavailability when google client disconnected?

            Thanks in advance!

            ...

            ANSWER

            Answered 2018-Dec-12 at 10:41

            To terminate the the RPC call from the client side you can use audioRecorder.stop() from the node-audiorecorder.

            You can get more information on how gRPC works in the gRPC concepts documentation.

            On how to handle network failures and other errors you can take a look at this. Here you can find some examples.

            Source https://stackoverflow.com/questions/53719630

            QUESTION

            Authentication troubles for google cloud speech api
            Asked 2018-Mar-22 at 20:14

            I trying to get started with google cloud speech with node.js but I am having troubles with authentication. I am following the setup steps outlined on the github. I tried the setup in this tutorial but had no luck.I keep getting this error..

            ...

            ANSWER

            Answered 2018-Mar-22 at 15:17

            As the error message said, you should read this to get your credentials set up.

            Source https://stackoverflow.com/questions/49431965

            QUESTION

            Google cloud speech API not transcription from base64 audio
            Asked 2018-Feb-21 at 11:47

            I'm trying to use Google cloud speech API, by recording audio in my Angular FrontEnd, converting it to base64, sending it to my Node backend, which does the query to google speech API.

            So far I have had no success with it, google only sending me empty results.

            You'll see that in order to identify the problem, I'm looping through all possible sampleRate and audio format.

            Another thing to note is that testing with Google example audio.raw (found here https://github.com/googleapis/nodejs-speech/tree/master/samples), it works, and I get a transcription.

            Here is my front end:

            ...

            ANSWER

            Answered 2018-Feb-21 at 11:47

            Since the audio.raw from the Google example works, the issue is likely with the audio you're using. The Speech API is a bit finicky with the audio it accepts. (Mono only for example, see this article). The problem you're seeing is described in the troubleshooting section for the Speech API, where it states why you can get an empty response.

            I've tested the mozdevs MediaRecorder examples here to create an audio file and pass that to the Speech API, and it seems the API really doesn't like the format that MediaRecorder creates.

            You'll have to convert the audio into something like FLAC or LINEAR16 to get the Speech API to interpret it. Doing some digging I found this github example, and passing the resulting audio from that to the Speech API I get the correct transcript back from the API.

            Source https://stackoverflow.com/questions/48807444

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nodejs-speech

            You can download it from GitHub.

            Support

            Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/googleapis/nodejs-speech.git

          • CLI

            gh repo clone googleapis/nodejs-speech

          • sshUrl

            git@github.com:googleapis/nodejs-speech.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link