audiojs / audio-play Goto Github PK
View Code? Open in Web Editor NEWPlay audio buffer in browser/node
License: MIT License
Play audio buffer in browser/node
License: MIT License
Apparently installation fails due to "invalid syntax" somewhere in Python code.
The need to have Python installed is not documented, nor is which version of Python is expected.
I have been trying to play an mp3 under nw.js (26.2) in Windows, and haven't had any success. I rebuilt (node-gyp) the speaker module, giving it the correct nw.js version, but still no luck. My code is simple:
const playBeep = require('audio-play'); // npm module to play beep for configuration
const loadBeep = require('audio-loader');
.
.
loadBeep('./solemn.mp3').then(playBeep); // play the beep
But I would like to play multichannel wav files as well.
Has it been tested under nw.js, and is there something I should be modifying/adding?
Can I select where my sound will be played?
The problem is that audio-play is taken by former play-audio, whereas play-audio is free-like.
I am going to write to @npm and @deathcap to resolve this, if possible, to make swapping.
To change playback during the playback :inception_mem:
let playback = play(stuff)
playback.rate *= 1.1
I'm using this package from an Electron application. As the title says, any files that are less than 100 kb in size play fine, but any over that get the playback rate cut in half as far as I can hear. This happens regardless of format.
Is there any reason for this happening, and is there a fix? Not exactly the optimal situation to have.
i am paasing array buffer and below error is happening please guide
(node:36124) UnhandledPromiseRejectionWarning: Error: Argument should be an audio buffer
at Play (/Users/koenig/Documents/electron/TSP/node_modules/audio-play/index.js:12:36)
at IpcMainImpl.<anonymous> (/Users/koenig/Documents/electron/TSP/main.js:29:18)
(node:36124) UnhandledPromiseRejectionWarning: Error: Argument should be an audio buffer
at Play (/Users/koenig/Documents/electron/TSP/node_modules/audio-play/index.js:12:36)
at IpcMainImpl.<anonymous> (/Users/koenig/Documents/electron/TSP/main.js:29:18)
(node:36124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:36124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
^Ckoenigs-MacBook-Air-2:TSP koenig$ npm start
Branch | Build failing π¨ |
---|---|
Dependency | is-audio-buffer |
Current Version | 1.0.8 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
is-audio-buffer is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you itβs very likely also breaking them.
I recommend you give this issue a very high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Google Cloud Text to Speech returns a response.audioContent
which logs to console as:
<Buffer ff f3 44 c4 00 12 6a d5 44 01 41 10 01 c6 37 00 20 8c 6c 80 04 05 fe 84 6a 9c ef f3 9f 39 f2 10 9f e4 24 8d bf fc e7 79 cf 21 09 c9 53 9e 42 49 53 ba ... 4846 more bytes>
Running this:
let playback = play(response.audioContent);
playback.play();
Errors out with:
Error: Argument should be an audio buffer
Am I doing something wrong?
Branch | Build failing π¨ |
---|---|
Dependency | audio-lena |
Current Version | 1.1.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As audio-lena is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 7 commits.
f709b66
1.1.3
176a0c7
Remove greenkeeper
eb21a39
Explain example better
d502bb9
Add spec table
efdebef
Merge pull request #4 from audiojs/greenkeeper/initial
66b1414
docs(readme): add Greenkeeper badge
7041c5a
chore(package): update dependencies
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
I use create-react-app
and one of my dependencies is audio-play
. Sadly I can't build my create-react-app
due to this error:
βΆ yarn build
yarn run v1.6.0
$ react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/audio-play/browser.js:16
As per their instructions to resolve this it says
"Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled."
So can we please have a pre-compiled version within the package?
It happened on Mac Big Sur and Windows 10.
how can i play list of .wav files sequentially
When using NPM local mp3 audio gets pitched down and is mixed weirdly.
After playing a buffer, I get the following error.
play('testfile.mp3');
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
This error repeats in a loop.
For CLI would be nice to play any source audio-loader can play, as well as soundcloud etc.
play https://soundcloud.com/xxx
Just leave it here to cancel later.
I'm on Mac OS (10.13.6) using nodejs (10.13). When I'm trying to play an mp3 file the playback speed is slowed down and it starts in the middle of the track.
I've tried multiple mp3 files from different sources - mostly all with the same outcome.
This is an example which is not working for me when I download it and try to play it locally.
The only file I actually could get to play as expected was a random test I downloaded here.
Unfortunately I don't know how to determine which audio library is being used to decode the mp3 files to provide further information.
When I try to install this library with
npm i audio-play
Then
node-gyp rebuild
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Would skipping forward/backward on the buffer fit inside the use of this module? For example player.forward(duration?)
/.backward(duration?)
Also taking into account when buffer is playing/paused.
If this is possible, it would be even cooler to potentially adapt the interface to streams. So for example it lazy loads over the network (buffers data as it plays), and if you skip forward it can compensate with loading that data, and with skipping backwards it could just refer back to what the stream has received.
In particular, browser time is tracked only when paused. Guess we can define sort of getter on playback
object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.