Git Product home page Git Product logo

Comments (15)

geekuillaume avatar geekuillaume commented on June 13, 2024

I have only tested Raspbian with the provided ARM package. It's possible your distribution doesn't include some packages that are included by default with Raspbian. If you already checked the deps with sudo apt-get install -f you can try to install the Chrome or Chromium package for your distribution. These packages have the majority of the same deps than what Electron (which Soundsync uses) requires.

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

I've tried multiple distributions for my SBC (Rock64): Ubuntu, debian, Armbian, DietPi as well as headless AND desktop versions of many of them, and am never able to get past this same error. I've installed all the recommended chromium libs (and Chromium opens fine..) Audio works in general both over HDMI and spdif, as well as through a USB DAC I have, but I can't ever get SoundSync to start. I've even tried compiling/running it with node unsuccessfully.

Any chance you could update the readme with some compiling instructions?

from soundsync.

geekuillaume avatar geekuillaume commented on June 13, 2024

To start Soundsync manually you need NodeJS and Git installed then clone this repo git clone https://github.com/geekuillaume/soundsync, install the deps npm install, build npm run build than start it npm run start. If you still have the problem, can you send me the logs generated by this command?

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

Thanks for the quick rundown!

I'm getting closer, slowly but surely..

installed nodejs..

curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs

Had to manually install yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn

autoworklet errors:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/dietpi/Desktop/soundsync/app/node_modules/audioworklet/node_modules/.bin:/home/dietpi/Desktop/soundsync/app/node$9 verbose lifecycle [email protected]~build: CWD: /home/dietpi/Desktop/soundsync/app/node_modules/audioworklet
10 silly lifecycle [email protected]~build: Args: [ '-c', 'run-script-os' ]
11 info lifecycle [email protected]~build: Failed to exec build script
12 verbose stack Error: [email protected] build: `run-script-os`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:314:20)
12 verbose stack     at maybeClose (internal/child_process.js:1047:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
13 verbose pkgid [email protected]
14 verbose cwd /home/dietpi/Desktop/soundsync/app/node_modules/audioworklet
15 verbose Linux 5.8.13-rockchip64
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
17 verbose node v14.13.1
18 verbose npm  v6.14.8
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] build: `run-script-os`
23 error spawn ENOENT
24 error Failed at the [email protected] build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

And here's the tail of the log:

45 silly build [email protected]
46 info linkStuff [email protected]
47 silly linkStuff [email protected] has /home/dietpi/Desktop as its parent node_modules
48 silly install [email protected]
49 info lifecycle [email protected]~install: [email protected]
50 silly postinstall [email protected]                                                                                                                                                                                                     51 info lifecycle [email protected]~postinstall: [email protected]
52 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle true
53 verbose lifecycle [email protected]~postinstall: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/dietpi/Desktop/soundsync/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
54 verbose lifecycle [email protected]~postinstall: CWD: /home/dietpi/Desktop/soundsync
55 silly lifecycle [email protected]~postinstall: Args: [ '-c', 'cd app && (yarn || npm install)' ]
56 timing audit submit Completed in 636ms
57 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 638ms
58 timing audit body Completed in 9ms
59 silly lifecycle [email protected]~postinstall: Returned: code: 1  signal: null
60 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
61 verbose stack Error: [email protected] postinstall: `cd app && (yarn || npm install)`
61 verbose stack Exit status 1
61 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
61 verbose stack     at EventEmitter.emit (events.js:314:20)
61 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
61 verbose stack     at ChildProcess.emit (events.js:314:20)
61 verbose stack     at maybeClose (internal/child_process.js:1047:16)
61 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
62 verbose pkgid [email protected]
63 verbose cwd /home/dietpi/Desktop/soundsync
64 verbose Linux 5.8.13-rockchip64
65 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
66 verbose node v14.13.1
67 verbose npm  v6.14.8
68 error code ELIFECYCLE
69 error errno 1
70 error [email protected] postinstall: `cd app && (yarn || npm install)`
70 error Exit status 1

from soundsync.

geekuillaume avatar geekuillaume commented on June 13, 2024

The install process is failing because I didn't include a Arm64 version of audioworklet. I've just released a new version with this arch enabled. Can you try pulling and reinstalling the deps with yarn ?

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

It took some more work, but I got it to run!

I did another clone, installed typescript, manually installed webpack and the newest audioworklet, manually installed pulseaudio, did some other stuff..
image

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

Finally got around to testing it and I'm not able to send any audio to or receive from it. Looks like everything is sent/received out of order and is dropped. I never hear anything.
image

from soundsync.

geekuillaume avatar geekuillaume commented on June 13, 2024

It seems that the audio is not processed quickly enough to be sent to the audio device in the configured latency. I've implemented some optimizations today. Can you test it with the latest commit (bec36ff)?

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

Did a git pull then yarn then npm run build then npm run start. Sound source is my Windows 10 desktop with a Ryzen 3700X. This SBC is actually faster than a Pi 3, which is why this is so strange. I've also pulled up htop to show CPU and memory usage.

image

from soundsync.

geekuillaume avatar geekuillaume commented on June 13, 2024

I've found a bug related to the audio synchronization that could lead in silence. Can you again test the last commit ? Sorry for all this but I cannot reproduce the bug and it's way harder to pinpoint the source of the problem.

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

It works! You nailed it with that bug fix. I also tried to install the previous version from the deb package with the same x11 error, but at least I can build and run it manually.

Thanks and great work!

image

Here's the SBC I'm using: https://www.amazon.com/Iconikal-Rockchip-Computer-Processor-1866MHz/dp/B0868WSTXH

from soundsync.

geekuillaume avatar geekuillaume commented on June 13, 2024

Nice :) Does this work with electron (yarn run start:electron) ?

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

Yes, it does appear to work.

image

I can get you terminal access if you want to troubleshoot the deb package, just let me know.

edit: I also tried the auto-start option but it just launched an generic Electron window instead of SoundSync. I was able to get SoundSync to run at startup by changing the command in the .desktop file to yarn --cwd /path/to/soundsync run start:electron and it launched like a charm.

from soundsync.

BradleyShaner avatar BradleyShaner commented on June 13, 2024

This needs more testing and it's probably got some redundant commands but I was able to get SoundSync running with some or all of this. I'm not sure if it will work all in one copy+paste, but it's definitely something for others to go off of when trying to run this on a headless install.

This was used on Armbian_20.08.1_Rock64_focal_legacy_4.4.213.img headless/server install.
If anyone has any input or additional commands to run please let me know!
(I'd run each set of commands at a time -- this is not a bash script)

sudo apt-get update
sudo apt-get -y upgrade

#install alsa
sudo apt-get install libasound2 libasound2-plugins alsa-utils alsa-oss

#install pulseaudio
sudo apt-get install pulseaudio pulseaudio-utils

#set group memberships. Change username to yours
#may not be necessary
sudo usermod -aG pulse,pulse-access,audio <username>

#unmute all sound devices, probably not necessary
for x in `amixer controls  | grep layback` ; do amixer cset "${x}" on ; done

#Set pulseaudio to auto-run when needed otherwise it may not be running at boot
#sudo nano /etc/pulse/client.conf
#remove the ; next to 
#; autospawn = yes
#and save it

#install nodejs
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt-get install -y nodejs

#Install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt -y install yarn

#install git
sudo apt-get install -y git

#install npm
sudo apt-get -y install npm

#if you get "you have held broken packages" error you can try and run this:
#sudo apt install aptitude
#sudo aptitude install npm

#clone repo to /opt/soundsync
cd /opt
sudo git clone https://github.com/geekuillaume/soundsync

#easy permissions, feel free to lock yours down stronger
sudo chmod -R 777 soundsync
cd soundsync

#install dependencies
npm install

#install webpack if it doesn't install?
#npm install webpack

#install typescript
npm install typescript --save-dev

#run yarn. I guess it's another package manager?
yarn

#run soundsync build script
npm run build

#run soundsync start script
npm run start

#if everything worked, SoundSync should be running!
#ctrl+c to stop it

#can use pm2 to auto-run soundsync
sudo npm install -g pm2

#don't run these as root, but rather your user
#and be sure to still be in /opt/soundsync working dir
pm2 --name SoundSync start npm -- start

#SoundSync should now be running in a daemon.
#To run at startup use this and do as it says.
pm2 startup

#then run this to save the list of running npm processes
pm2 save


from soundsync.

Related Issues (20)

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.