Beep

一个小小的软件包,可以为任何Go应用程序带来声音。适用于播放和音频处理。「A little package that brings sound to any Go application. Suitable for playback and audio-processing.」

Github星跟蹤圖

Beep GoDoc Go Report Card

A little package that brings sound to any Go application. Suitable for playback and audio-processing.

go get -u github.com/faiface/beep

Features

Beep is built on top of its Streamer interface, which is like io.Reader, but for audio. It was one of the best design decisions I've ever made and it enabled all the rest of the features to naturally come together with not much code.

  • Decode and play WAV, MP3, OGG, and FLAC.
  • Encode and save WAV.
  • Very simple API. Limiting the support to stereo (two channel) audio made it possible to simplify the architecture and the API.
  • Rich library of compositors and effects. Loop, pause/resume, change volume, mix, sequence, change playback speed, and more.
  • Easily create new effects. With the Streamer interface, creating new effects is very easy.
  • Generate completely own artificial sounds. Again, the Streamer interface enables easy sound generation.
  • Very small codebase. The core is just ~1K LOC.

Tutorial

The Wiki contains a handful of tutorials for you to get started. They teach the fundamentals and advanced topics alike. Read them especially if you call speaker.Init every time you play something.

Examples

Speedy Player Doppler Stereo Room
Speedy Player Doppler Stereo Room

Dependencies

For playback, Beep uses Oto under the hood. Check its requirements to see what you need to install for building your application.

Running an already built application should work with no extra dependencies.

Licence

MIT

Projects using beep

主要指標

概覽
名稱與所有者faiface/beep
主編程語言Go
編程語言Go (語言數: 1)
平台Linux, Mac, Windows
許可證MIT License
所有者活动
創建於2017-07-14 16:29:59
推送於2024-03-19 19:50:56
最后一次提交2023-10-08 09:12:32
發布數4
最新版本名稱v1.1.0 (發布於 )
第一版名稱v1.0.0 (發布於 )
用户参与
星數2.1k
關注者數25
派生數154
提交數220
已啟用問題?
問題數123
打開的問題數67
拉請求數34
打開的拉請求數8
關閉的拉請求數9
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?