Audio spatialization over WebRTC and JACK Audio Connection Kit

Related tags

Audiospatify
Overview

Audio spatialization over WebRTC

Spatify provides a framework for building multichannel installations using WebRTC.

With Spatify each client becomes a JACK client on the host machine, any audio sent to that client's ports will be streamed over WebRTC to the client.

The original idea behind this project was to use multiple smartphones as individual speakers in installations or performances.

Installing

You will need Python >= 3.7 together with websockets and aiortc python libraries.

$ git clone [email protected]:bgola/spatify.git
$ cd spatify/
$ pip install websockets aiortc
$ python setup.py install

Running

$ spatify -h
usage: spatify [-h] [--cert CERT] [--key KEY] [--host HOST] [--port PORT] [--verbose] [--quiet]

Spatify server

optional arguments:
  -h, --help     show this help message and exit
  --cert CERT    SSL certificate path (for WSS)
  --key KEY      SSL key path (for WSS)
  --host HOST    Host for WebSocket server (default: 0.0.0.0)
  --port PORT    Port for WebSocket server (default: 8765)
  --verbose, -v
  --quiet, -q

Checking the example

In the examples/ folder there is an HTML/JavaScript example for using WebSockets as signaling mechanism and estabilishing the WebRTC streams. Notice that the example uses a self-signed SSL certificafe because you can't start the WebRTC stream over an unsecured connection (you need HTTPS). Your browser might complain that the certificate is not to be trusted. Also, some browsers might fail to initiate the secure WebSocket connection for the same reason. This example was tested on chromium and on chrome for android. To fix this in a real case you need a proper certificate (by using letsencrypt for example).

You can use the python script to serve the examples/ folder via HTTPS (remember to edit the HTML example file to use your IP address, otherwise it will only work for localhost):

$ cd examples/
$ python https_server.py

and on another terminal run spatify:

$ cd examples/
$ spatify --crt localhost.cert --key localhost.key
2020-12-12 15:25,509 Listening for websocket signaling on 0.0.0.0:8765

Now open https:///websockets.html and click on "Start connection".

You should see a new JACK client called spatify_* registered (if you use QJackCtl or Carla it should appear in the routing). Route any audio to this new client and it should play on the browser you used.

Owner
Bruno Gola
sound, art and code
Bruno Gola
Praat in Python, the Pythonic way

Parselmouth - Praat in Python, the Pythonic way Parselmouth is a Python library for the Praat software. Though other attempts have been made at portin

Yannick Jadoul 786 Jan 09, 2023
❤️ This Is The EzilaXMusicPlayer Advaced Repo 🎵

Telegram EzilaXMusicPlayer Bot 🎵 A bot that can play music on telegram group's voice Chat ❤️ Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+

Sadew Jayasekara 11 Nov 12, 2022
Audio features extraction

Yaafe Yet Another Audio Feature Extractor Build status Branch master : Branch dev : Anaconda : Install Conda Yaafe can be easily install with conda. T

Yaafe 231 Dec 26, 2022
A Simple Script that will help you to Play / Change Songs with just your Voice

Auto-Spotify using Voice Recognition A Simple Script that will help you to Play / Change Songs with just your Voice Explore the docs » Table of Conten

Mehul Shah 1 Nov 21, 2021
Guide & Examples to create deeplearning gstreamer plugins and use them in your pipeline

upai-gst-dl-plugins Guide & Examples to create deeplearning gstreamer plugins and use them in your pipeline Introduction Thanks to the work done by @j

UPAI.IO 11 Dec 11, 2022
Using python to generate a bat script of repetitive lines of code that differ in some way but can sort out a group of audio files according to their common names

Batch Sorting Using python to generate a bat script of repetitive lines of code that differ in some way but can sort out a group of audio files accord

David Mainoo 1 Oct 29, 2021
pyo is a Python module written in C to help digital signal processing script creation.

pyo is a Python module written in C to help digital signal processing script creation.

Olivier Bélanger 1.1k Jan 01, 2023
Python CD-DA ripper preferring accuracy over speed

Whipper Whipper is a Python 3 (3.6+) CD-DA ripper based on the morituri project (CDDA ripper for *nix systems aiming for accuracy over speed). It star

671 Jan 04, 2023
TONet: Tone-Octave Network for Singing Melody Extraction from Polyphonic Music

TONet Introduction The official implementation of "TONet: Tone-Octave Network for Singing Melody Extraction from Polyphonic Music", in ICASSP 2022 We

Knut(Ke) Chen 29 Dec 01, 2022
Graphical interface to control granular sound synthesis.

Granular sound synthesis interface SoundGrain is a graphical interface where users can draw and edit trajectories to control granular sound synthesis

Olivier Bélanger 122 Dec 10, 2022
Desktop music recognition application for windows

MusicRecognizer Music recognition application for windows You can choose from which of the devices the recording will be made. If you choose speakers,

Nikita Merzlyakov 28 Dec 13, 2022
Codes for "Efficient Long-Range Attention Network for Image Super-resolution"

ELAN Codes for "Efficient Long-Range Attention Network for Image Super-resolution", arxiv link. Dependencies & Installation Please refer to the follow

xindong zhang 124 Dec 22, 2022
Telegram Voice-Chat Bot Written In Python Using Pyrogram.

Telegram Voice-Chat Bot Telegram Voice-Chat Bot To Play Music From Various Sources In Your Group Support All linux based os. Windows Mac Diagram Requi

TheHamkerCat 314 Dec 29, 2022
Python library for audio and music analysis

librosa A python package for music and audio analysis. Documentation See https://librosa.org/doc/ for a complete reference manual and introductory tut

librosa 5.6k Jan 06, 2023
AudioDVP:Photorealistic Audio-driven Video Portraits

AudioDVP This is the official implementation of Photorealistic Audio-driven Video Portraits. Major Requirements Ubuntu = 18.04 PyTorch = 1.2 GCC =

232 Jan 03, 2023
Convert complex chord names to midi notes

ezchord Simple python script that can convert complex chord names to midi notes Prerequisites pip install midiutil Usage ./ezchord.py Dmin7 G7 C timi

Alex Zhang 2 Dec 20, 2022
Datamoshing with FFmpeg

ffmosher Datamoshing with FFmpeg Drag and drop video onto mosh.bat to create a datamoshed video. To datamosh an image, please ensure the file is in a

18 Sep 11, 2022
XA Music Player - Telegram Music Bot

XA Music Player Requirements 📝 FFmpeg (Latest) NodeJS nodesource.com (NodeJS 17+) Python (3.10+) PyTgCalls (Lastest) MongoDB (3.12.1) 2nd Telegram Ac

RexAshh 3 Jun 30, 2022
Oliva music bot help to play vc music

OLIVA V2 🎵 Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls Commands 🛠 For all in group /play - reply to youtube url or song file

SOUL々H҉A҉C҉K҉E҉R҉ 2 Oct 22, 2021
A simple music player, powered by Python, utilising various libraries such as Tkinter and Pygame

A simple music player, powered by Python, utilising various libraries such as Tkinter and Pygame

PotentialCoding 2 May 12, 2022