1.1.6 • Published 2 years ago

play-sound v1.1.6

Weekly downloads
5,125
License
MIT
Repository
github
Last release
2 years ago

play-sound

Downloads

Play sounds by shelling out to one of the available audio players.

Installation

npm install play-sound

Examples

var player = require('play-sound')(opts = {})

// $ mplayer foo.mp3 
player.play('foo.mp3', function(err){
  if (err) throw err
})

// { timeout: 300 } will be passed to child process
player.play('foo.mp3', { timeout: 300 }, function(err){
  if (err) throw err
})

// configure arguments for executable if any
player.play('foo.mp3', { afplay: ['-v', 1 ] /* lower volume for afplay on OSX */ }, function(err){
  if (err) throw err
})

// access the node child_process in case you need to kill it on demand
var audio = player.play('foo.mp3', function(err){
  if (err && !err.killed) throw err
})
audio.kill()

Options

Prior art

  • play.js - play sound files from node.js to your speakers

License

MIT

stackwiselifx-controllerplay-tts@bugsounet/gabinance-alertino-multichat@openaudioserver/open-audio-servermdb-build-notification@bugsounet/native-soundplay-sound-cli@infinitebrahmanuniverse/nolb-playchimerifyrussian-blad-webpack-pluginrainymood@everything-registry/sub-chunk-2445geptyro-bottake-a-breakwipwoiehrwuwe-need-a-warning-signalwe-need-to-go-deeperworkshopatcyberworkshopatcyberaprilwhale-trackerwhatsapp-notification-soundtelma-4gsumansweet-warningthe-termagotchithing-it-device-speechthomasjs@rstacruz/passtimegetmarksjest-reporteris-epfl-downjest-fuckjukeberry-nodeclientjukebox-utilsjquizcmdjssljeopardy-loadingjest-mario-reporterjest-audio-reporterjqq-stream-utilsiris-embedded-sdkit-cmdjvmtjust-fasaklaelesounds-webpack-pluginsoundbrduhohhtts-watsontyped-testertypeinstallturniptime-controltyping-gametosscointomou-na-jabiracatvarillo@blitz_studio/music_player15-minute-rule@dfyu/soundzafuyaba-release-cliyumu-translateyami-alarmyametezen-timerzekromzoocliwanm-adventure-gamewatcher-sudowebpack-benny-hill-pluginunit-test-league-of-legends@heat/awsless@hendrikprinsza/basic-tts-player@londelo/pomo_go@isfeng/bing-dict@machinacommons/adaptorex_dev@mxpsql-server-20953-onetechguy/sarahjs@nomyx/assistant@nomyx/assistant-cli@nomyx/assistant-tools@meri-imperiumi/signalk-audio-notifications@monstermakes/larry-scaffolds@ioup/mia-bot@raphaelbrodrigues/tomou-na-jabiraca@remardev/ai@pindakaasman/exploding-error@pioneer-platform/pioneer-app-electron@pioneer-platform/pioneer-app@pioneer-platform/pioneer-app-e2e@secrez/utilsmufasa-fridaymosi-climorninmore-cowbellmocha-septa-reporter
1.1.6

2 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

7 years ago

1.1.2

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago