ws-audio-api | WebSocket Audio API : library to broadcast the sound | Audio Utils library

 by   Ivan-Feofanov JavaScript Version: 0.1.5 License: MIT

kandi X-RAY | ws-audio-api Summary

kandi X-RAY | ws-audio-api Summary

ws-audio-api is a JavaScript library typically used in Audio, Audio Utils applications. ws-audio-api has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i ws-audio-api' or download it from GitHub, npm.

WebSocket Audio API: library to broadcast the sound from the microphone through a WebSocket
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ws-audio-api has a low active ecosystem.
              It has 166 star(s) with 33 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 10 open issues and 4 have been closed. On average issues are closed in 26 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of ws-audio-api is 0.1.5

            kandi-Quality Quality

              ws-audio-api has 0 bugs and 0 code smells.

            kandi-Security Security

              ws-audio-api has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ws-audio-api code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ws-audio-api is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ws-audio-api releases are available to install and integrate.
              Deployable package is available in npm.
              ws-audio-api saves you 14 person hours of effort in developing the same functionality from scratch.
              It has 41 lines of code, 0 functions and 5 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            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 ws-audio-api
            Get all kandi verified functions for this library.

            ws-audio-api Key Features

            No Key Features are available at this moment for ws-audio-api.

            ws-audio-api Examples and Code Snippets

            No Code Snippets are available at this moment for ws-audio-api.

            Community Discussions

            QUESTION

            AudioContext, getUserMedia, and websockets audio streaming
            Asked 2021-Apr-25 at 20:26

            I am trying to make an as-simple-as-possible Javascript frontend that will allow me to receive audio from a user's mic on a mouse click within a web browser using getUserMedia, modify it to a custom sample rate and monochannel, and stream it over a websocket to my server where it will be relayed to Watson Speech API.

            I have already built the websocket server using autobahn. I have been trying to make an updated client library drawing on whisper and ws-audio-api but both libraries seem outdated and include much functionality I don't need which I am trying to filter out. I am using XAudioJS to resample the audio.

            My current progress is in this Codepen. I am stuck and having trouble finding more clear examples.

            1. Both whisper and ws-audio-api initialize the AudioContext on page load, resulting in an error in at least Chrome and iOS as audio context must now be initialized as a response to user interaction. I have tried to move the AudioContext into the onClick event but this results in my having to click twice to begin streaming. I am currently using audio_context.resume() within the onClick event but this seems like a roundabout solution and results in the page showing it is always recording, even when it's not, which may make my users uneasy. How can I properly initiate the recording on click and terminate it on click?
            2. I have updated from the deprecated Navigator.getUserMedia() to MediaDevices.getUserMedia() but not sure if I need to alter the legacy vendor prefixes on lines 83-86 to match the new function?
            3. Most importantly, once I get a stream from getUserMedia, how can I properly resample it and forward it to the open websocket? I am a bit confused by the structure of bouncing the audio from node to node and I need help with lines 93-108.
            ...

            ANSWER

            Answered 2021-Apr-25 at 20:26

            I found help here and was able to build a more modern JavaScript frontend based on the code from vin-ni's Google-Cloud-Speech-Node-Socket-Playground which I tweaked a bit. A lot of the existing audio streaming demos out there in 2021 are either outdated and/ or have a ton of "extra" features which raise the barrier to getting started with websockets and audio streaming. I created this "bare bones" script which reduces the audio streaming down to only four key functions:

            1. Open websocket
            2. Start Streaming
            3. Resample audio
            4. Stop streaming

            Hopefully this KISS (Keep It Simple, Stupid) demo can help somebody else get started with streaming audio a little faster than it took me.

            Here is my JavaScript frontend

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install ws-audio-api

            You can install using 'npm i ws-audio-api' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries
            Install
          • npm

            npm i ws-audio-api

          • CLONE
          • HTTPS

            https://github.com/Ivan-Feofanov/ws-audio-api.git

          • CLI

            gh repo clone Ivan-Feofanov/ws-audio-api

          • sshUrl

            git@github.com:Ivan-Feofanov/ws-audio-api.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

            Explore Related Topics

            Consider Popular Audio Utils Libraries

            howler.js

            by goldfire

            fingerprintjs

            by fingerprintjs

            Tone.js

            by Tonejs

            AudioKit

            by AudioKit

            sonic-pi

            by sonic-pi-net

            Try Top Libraries by Ivan-Feofanov

            github-release-bot

            by Ivan-FeofanovPython