Giter VIP home page Giter VIP logo

pspmultiroomplayer's Introduction

PspMultiRoomPlayer

This is a standalone program there play Internet radio and music in companion with skill_MultiRoomMediaVolume and skill_MultiRoomRadioManager.

It belongs to the synchronous multiroom audio system i am building. Uses the excelent snapcast system by badaix.

It is an Internet radiostation/music player that plays in sync (like sonos) with other PspMultiRoomPlayers.

The PspMultiRoomPlayer is used as a satellite player e.g. on a ProjectAlice satellite or another hardware.

Run ./setup.sh to create the virtual python environment.

Insert at the buttom of /etc/asound.conf or where your config is, if you have one that not for sure.

pcm.snapcastSpeaker {
   type plug
   slave {
      pcm "hw:X,0" # Importent!, leave this comment so PspMultiRoomPlayer can check and changes this cardNo.
   }
}

If you set "autosoundCardNo": false - You have to set the X to you real cardNo showing in aplay -l.

if "autosoundCardNo": true - You don't need to set the X to be the real cardNo, just leave the X. It will change automatically. If you have a a respeaker 2 for example, then you should insert thispcm.snapcastSpeaker in the bottom /etc/voicecard/asound_2mic.conf.

the "startVolume" Is used when you stop the MultiRoomPlayer you mixer will then be set to this volume.

And then use snapcastSpeaker in config.json 'mixerDeviceName'

For now, I use a about 1 USD, USB sound card as a snapcast speaker (cheaply between $ 1 and $ 1.5). However, you can use RPi's built-in bcm2835 headphones as long as it is not used by other hardware.

Be sure to edit the PspMultiRoomPlayer.service

config.json example

{
    "thisSite": "office",
    "asoundPcmName": "snapcastSpeaker",
    "mixerPlaybackName": "Speaker",
    "soundCardDevice": "Device [USB Audio Device], device 0: USB Audio [USB Audio]",
    "autosoundCardNo" : false,
    "soundCardHwNo": "1",
    "volumeOffset": "0",
    "mqttHost": "<MqttHostIp>",
    "mqttport": "1883",
    "snapServerHost": "<SnapcastServerIp>",
    "latency": 0,
    "startVolume": "50"
}

"snapServerHost": "" is ProjectAlice Ip.

"mixerPlaybackName": "Speaker" can be seen in alsamixer -c X, X from aplay -l cardNo

e.g "soundCardDevice": "Device [USB Audio Device], device 0: USB Audio [USB Audio]" or "soundCardDevice": "Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]"

On my Ubuntu 20.04 AMD the config looks like this, I don't have an etc/asound.conf.

{
    "thisSite": "office",
    "asoundPcmName": "pulse",
    "mixerPlaybackName": "Master",
    "soundCardDevice": "Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]",
    "autosoundCardNo" : false,
    "soundCardHwNo": "1",
    "volumeOffset": "6",
    "mqttHost": "192.168.xx.xx",
    "mqttport": "1883",
    "snapServerHost": "192.168.xx.xx",
    "latency": 0,
    "startVolume": "50"
}

pspmultiroomplayer's People

Contributors

poulsp avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.