All Projects → arirusso → audio-playback

arirusso / audio-playback

Licence: other
Ruby/Command Line Audio File Player

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to audio-playback

DFPlayerMini Fast
Fast and easy to understand Arduino library to use the DFPlayer Mini MP3 module from DFRobot.com. This is a huge improvement (both in terms of execution speed and simplicity) to the standard library provided by DFRobot.com.
Stars: ✭ 164 (+720%)
Mutual labels:  mp3, sound, wav
loudgain
ReplayGain 2.0 loudness normalizer based on the EBU R128/ITU BS.1770 standard (-18 LUFS, FLAC, Ogg, MP2, MP3, MP4, M4A, AAC, ALAC, Opus, ASF, WMA, WAV, AIFF, WavPack, APE)
Stars: ✭ 127 (+535%)
Mutual labels:  mp3, wav, aiff
java-stream-player
🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
Stars: ✭ 112 (+460%)
Mutual labels:  mp3, wav, aiff
Ni Media
NI Media is a C++ library for reading and writing audio streams.
Stars: ✭ 158 (+690%)
Mutual labels:  mp3, sound, wav
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+460%)
Mutual labels:  mp3, sound, wav
Audioplayer
Audio Player for Nextcloud and ownCloud
Stars: ✭ 179 (+795%)
Mutual labels:  mp3, wav
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (+800%)
Mutual labels:  mp3, wav
Recorder
html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例 和DTMF编解码
Stars: ✭ 2,891 (+14355%)
Mutual labels:  mp3, wav
Precomp Cpp
Precomp, C++ version - further compress already compressed files
Stars: ✭ 250 (+1150%)
Mutual labels:  mp3, command-line-tool
Flacon
Audio File Encoder. Extracts audio tracks from an audio CD image to separate tracks.
Stars: ✭ 252 (+1160%)
Mutual labels:  mp3, wav
StegX
Steganography (BMP, PNG, WAV, MP3, AVI, FLV)
Stars: ✭ 22 (+10%)
Mutual labels:  mp3, wav
sox-stream
📣 A stream-friendly wrapper around SoX
Stars: ✭ 50 (+150%)
Mutual labels:  mp3, wav
Audio Steganography Algorithms
A Library of Audio Steganography & Watermarking Algorithms
Stars: ✭ 146 (+630%)
Mutual labels:  mp3, wav
Symphonia
Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Stars: ✭ 191 (+855%)
Mutual labels:  mp3, wav
Mediafile
A unified reader of metadata from audio & video files.
Stars: ✭ 138 (+590%)
Mutual labels:  mp3, wav
Miniaudio
Single file audio playback and capture library written in C.
Stars: ✭ 1,889 (+9345%)
Mutual labels:  mp3, wav
Youtube-DL-GUI
Graphical User Interace built around youtube-dl CLI
Stars: ✭ 38 (+90%)
Mutual labels:  mp3, wav
simple-web-audio-recorder-demo
A simple HTML/JS demo that uses WebAudioRecorder.js to record audio on a web page
Stars: ✭ 141 (+605%)
Mutual labels:  mp3, wav
Vue Howler
[UNMAINTAINED] A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components
Stars: ✭ 103 (+415%)
Mutual labels:  mp3, wav
Music Metadata Browser
Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
Stars: ✭ 105 (+425%)
Mutual labels:  mp3, wav

Audio Playback

A command line and Ruby tool for playing audio files

Under the hood the portaudio and libsndfile libraries are used, enabling the gem to be cross-platform on any systems where these libraries are available

Installation

These packages must be installed first:

Both libraries are available in Homebrew, APT, Yum as well as many other package managers. For those who wish to compile themselves or need more information about those packages, follow the links above for more information

Once those libraries are installed, install the gem itself using

gem install audio-playback

Or if you're using Bundler, add this to your Gemfile

gem "audio-playback"

Usage

Command line

playback [filename] [options]

options:

  • -l Latency in seconds. Defaults to use the default latency for the selected output device

  • -b Buffer size in bytes. Defaults to 4096

  • -c Output audio to the given channel(s). Eg -c 0,1 will direct audio to channels 0 and 1. Defaults to use channels 0 and 1 on the selected device

  • -d Duration. Will stop after the given amount of time. Eg -d 56 stops after 56 seconds of playback

  • -e End position. Will stop at the given absolute time, irregardless of seek. Eg -e 56 stops at 56 seconds. -s 01:09:30 -e 01:10:00 stops at 1 hour 10 minutes after 30 seconds of playback

  • -o Output device id or name. Defaults to the system default

  • -s Seek to given time position. Eg -s 56 seeks to 56 seconds and -s 01:10:00 seeks to 1 hour 10 min.

  • -v or --verbose Verbose

  • --loop Loop playback continuously

  • --list-devices List the available audio output devices

example:

playback test/media/1-stereo-44100.wav -v -c 1

With Ruby

require "audio-playback"

# Prompt the user to select an audio output
@output = AudioPlayback::Device::Output.gets

options = {
  :channels => [0,1],
  :latency => 1,
  :output_device => @output
}

@playback = AudioPlayback.play("test/media/1-stereo-44100.wav", options)

# Play in the foreground
@playback.block

options:

  • :buffer_size Buffer size in bytes. Defaults to 4096

  • :channel or :channels Output audio to the given channel(s). Eg :channels => [0,1] will direct the audio to channels 0 and 1. Defaults to use channels 0 and 1 on the selected device

  • :latency Latency in seconds. Defaults to use the default latency for the selected output device

  • :logger Logger object

  • :output_device Output device id or name

More Examples

More Ruby code examples:

License

Licensed under Apache 2.0, See the file LICENSE

Copyright (c) 2015-2017 Ari Russo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].