网络电台服务器 – 向客户端广播音频源
Webradio server – broadcasts audio source to clients

原始链接: https://github.com/tau-org/tau-tower

**Tau Tower** 是一个由 NGI Zero Core 资助的项目,旨在向网络广播音频流。它参考了 Icecast 的设计,并与 **Tau Radio** 协同工作。Tau Radio 负责从本地机器(通过 PipeWire 或 BlackHole 等设备)捕获音频,并将其发送至运行 Tau Tower 的远程 VPS 服务器。 该软件提供了一个兼容 HTML 的音频流(例如 `tau.ogg`),可以嵌入到任何网站中,或者与 **Asciinema** 等工具集成,用于实时终端广播。 **主要特点:** * **安装:** 需要 Rust 环境(执行 `cargo install --git https://github.com/tau-org/tau-tower`)。 * **配置:** 通过 `tower.toml`(位于标准配置路径下)进行管理,用户可定义端口、凭据以及用于转播的 CORS 策略。 * **部署:** 建议部署在远程 VPS 上。如果在低内存环境(如入门级 Digital Ocean droplet)中使用,建议针对目标架构在本地构建项目。 * **工作流程:** Tau Radio(本地)→ 互联网 → 代理(如 Caddy)→ Tau Tower(远程)→ 音频流。 有关详细设置(包括 TLS/SSL 终止和代理配置),请参阅官方文档。

Hacker News | 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 投稿 | 登录 Webradio server – 将音频源广播至客户端 (github.com/tau-org) 9 分,由 modinfo 发布于 3 小时前 | 隐藏 | 往期 | 收藏 | 2 条评论 crtasm 28 分钟前 [–] 我对配合 Asciinema 一起运行的说明感到困惑。链接页面解释了其使用场景:https://nlnet.nl/project/Tau/ 如果你只需要音频,https://streammyaudio.com/ 也值得一看——它是一个包含客户端和服务器的单个二进制文件。 回复 fuzzfactor 6 分钟前 | 父评论 [–] 这两个看起来都很有意思。 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 加入 YC | 联系 搜索:
相关文章

原文

Compiles on macOS (Intel / Silicon), Ubuntu and NixOS

This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo NGI Zero Logo

This tool is built for livestreaming audio to the world wide web, broadcasting a audio stream from an instance of tau-radio, the accompanying software.

Modelled after the Icecast software, it serves a html audio stream that can be used in a audio tag on any other website.

You should run this on a remote server, such as a AWS, Digital Ocean or any VPS with the correct priviledges.

  • Note that the smallest available Digital Ocean 'Droplet' does not have enough RAM to build this project locally. The workaround is to build for that architecture using ex: cargo build --target x86_64-unknown-linux-gnu.

To install:

$ cargo install --git https://github.com/tau-org/tau-tower

The first time using the tool, it will search your system for a config file. It looks for it in the path

$HOME/.config/tau/tower.toml # on macOS

or

$XDG_CONFIG_HOME/tau/tower.toml # on Linux

If there is no config file located there, you will be prompted to create one.

# username and password are NOT secure, they only
# link a tauradio and tautower service together
username = "username" 
password = "emanresu" 

# Sets the listening port, to which the source stream is transmitted
listen_port = 8000      

# Sets the broadcast port, from which the stream will be accessable
broadcast-port = 8001       

# Sets the server http endpoint - http://localhost:8001/tau.ogg
broadcast-endpoint = "tau.ogg"       

# Optional: 
# Sets which other sites are able to rebroadcast the stream
# "*" allowes all, adding "http://localhost:4000" to list is redundant
cors_allow_list = ["*", "http://localhost:4000"]

If you want to temporarily overwrite the config, you are able to pass arguments.

# Ex: Uses temporary credentials, and disables the local recording. 
$ tau-tower \
  --listen-port <listen-port> \
  --broadcast-port <broadcast-port> \
  --cors-allow-list "*"

On Linux (using apt):

$ sudo apt update
$ sudo apt install build-essential

tau-radio runs on your local machine, and captures sound from the audio device on your system. The defaults are BlackHole 2ch on macOS, and pipewire on Linux, though these can be overwritten by the config or in the CLI arguments.

The captured audio is then streamed to the tau-tower, which should run on a remote server. This server application exposes a audio media stream that can be consumed by many clients, as a web radio.

Alongside tau-tower should run an instance of Asciinema which can use the live audio stream as background to a live terminal stream, by setting the broadcast endpoint URL as a media source in the streams settings.

https://example.com:8002/tau.ogg

For this to work, the Asciinema origin must be added to cors_allow_list in tower.toml:

cors_allow_list = ["https://example.com:4000"]
your computer remote server
(audio capture) (opt. tls/ssl) (proxy) (broadcaster) (opt. stream host)
tau-radio -> internet -> Caddy -> tau-tower -> Asciinema

For TLS termination and reverse proxy setup, see Proxy Setup (Caddy).

联系我们 contact @ memedata.com