aschober / vinyl-cast

Listen to vinyl records wirelessly throughout your home using an Android device.
MIT License
153 stars 32 forks source link

Releases #1

Closed dbwest closed 5 years ago

dbwest commented 7 years ago

Can you release and add the apks to github

beauremus commented 7 years ago

Ditto. There are no instructions for installation.

beauremus commented 7 years ago

I see now that you can't produce an apk due to Gracenote.

jkull2 commented 6 years ago

Do you have a how to on how to I stall this on my Android phone? I've never done anything like this before but I think this app is amazing and I want to try it. Thank you!

beauremus commented 6 years ago

This is not a simple process as it requires a special key from Gracenote. Gracenote is used to identify songs and their software would have to be licensed to distribute an APK. I was able to get a Gracenote key and install but I wouldn't say the process was easy. You edit the code include your key and then compile the whole app locally before transferring it to your phone.

aschober commented 6 years ago

Thanks @beauremus for the help.

thefischerman commented 6 years ago

Hello @beauremus and @aschober Can you add some kind of guide? I bought the usb hub and would like to try it. I understand it's not easy.

thefischerman commented 6 years ago

Also @aschober How did you power the UCA202? It appears to need a PC for power. Did you need a special power supply?

beauremus commented 6 years ago

@thefischerman I have a USB C phone and I decided to use https://www.amazon.com/gp/product/B06XY34GMJ/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

I'm pretty busy at the moment but maybe on a free weekend I can write something up.

thefischerman commented 6 years ago

@beauremus That would be awesome if you could find the time. The part to identify songs is not important to me. But more so i can Chromecast the audio around the house.

beauremus commented 6 years ago

@thefischerman

  1. Clone the repo
  2. Install android-studio https://developer.android.com/studio/index.html
  3. Open the downloaded repo as a project in Android Studio
  4. Build > Make Project
  5. Resolve issues
    • I found that commenting out the lines that refer to android-apt fixed my issues
  6. Build > Make Project
  7. Build > Build APK
  8. Move app_debug.apk to phone
  9. Enable ability to install apps from unknown source
  10. Install apk

I haven't tested that this works out of the box, but I imagine it should the only thing that is missing is the API key for the song recognition.

This is a basic road-map. There are a lot of issues that could come up in the process so maybe we can address those as they appear rather than guessing.

grainsoflight commented 6 years ago

@beauremus After compiling, were you able to get the app to actually work? Mine quits upon starting the stream every time on my Galaxy S7 and won't even install (Parse issue) on a Galaxy Tab 4.

beauremus commented 6 years ago

@grainsofflight Sorry, no I didn't use the apk from my instructions. Initially, yes I went through and got an API key for the song recognition and built an apk that worked. I've been using it for several months without issue.

ghost commented 6 years ago

@beauremus @aschober Using an S5 here. Same issue with crashing as @grainsoflight is having. Any ideas?

ghost commented 6 years ago

@grainsoflight I solved the crash issue by debugging and changing the sampling rate in AudioRecordTask.java to 44100. Apparently Android devices have different audio recording sampling rates. I'm able to get the app to run successfully, but my new issue is that when casting the audio has been torn into segments and compressed with silence in between. Still working out the bugs.

benroy73 commented 6 years ago

I was getting crashing too and connecting ADB over WiFi helped me run it and see the crash stack trace. (https://developer.android.com/studio/command-line/adb.html)

My issue was that the contents of my Gracenote "License String" needed to be in to the file app/src/main/assets/license.txt. I also replaced all \r\n with newlines, but I don't know if that was required.

Now it works great on my Nexus 5 with the UFO202.

LeoHaps commented 6 years ago

I try to build the app Android Studio. But I get the following error: _

Error:Failed to complete Gradle execution.

Cause: The version of Gradle you are using (3.3) does not support the forTasks() method on BuildActionExecuter. Support for this is available in Gradle 3.5 and all later versions.

_

I have no idea how to fix this. Does some one have a working APK file? I'd love to test this application. The video looks very promising!

benroy73 commented 6 years ago

I got past the Gradle 3.3 issue by changing it to 3.5 in the Android Studio menu File > Project Structure > Project > Gradle Version.

LeoHaps commented 6 years ago

@benroy73 Thank you for the comment, that did a big part of the trick!

Earlier you mentioned license.txt I figured out that there was no such file and also the folder assets did not exist yet, it that right? I created the folder and file, and past License String in it... Hopefully it will work. I will order the UFO202 today.

ssartz commented 6 years ago

I got my UFO202 connected to a Beelink GT1 Android TV Box. What is the best app to check that my setup is correct and I can play records to the speakers, before facing the Gracenote key and other issues and build the APK?
(would it be a good idea to add a "play to the phone speaker" option to the app?)

LeoHaps commented 6 years ago

@ssartz I used Voice Recorder to check if the combination of my Motorola G5 and the UFO202 works. https://play.google.com/store/apps/details?id=shadrin.audiorecorder

But Vinyl Cast is still not working, it keeps closing. Havn't used ADB jet.. hopefully this weekend some time.

ssartz commented 6 years ago

@LeoHaps thanks for the tip. I did use the recorder app and saw that my setup works. At the same time I understood that UFO202 is used as THE default android audioOUT. Ideally what I need is an app that gets the phono digitized input over USB and NOT direct it (and all other android audio) only to the USB but send it over HDMI/SPDIF to my stereo. Simpler than Vinul Cast but don't have the time to write...

npitts5397 commented 6 years ago

Hopefully this will help another novice like me someday...Finally got this to work after figuring out how to debug in Android Studio. Don't just build the the APK and expect it to work. Before building it, you'll need to the following:

  1. Make sure you update the strings for GRACENOTE_CLIENT_ID and GRACENOTE_CLIENT_TAG with your ID and tag values in MusicRecognizer.java (as noted in the readme for the project). These values are found on the Gracenote Developer site on the App Details page (after signing up, you have to create your own app in the Gracenote Dev site).

  2. As @benroy73 pointed out, you need to create license.txt in app/src/main/assets (I had to create the assets folder). The contents of this file is the License String from the same page on the GraceNote Dev App Details apge where you get your ID and tag.

  3. Build an APK (@beauremus 's instructions above were helpful), install it on your device, and tap the record to select a cast device.

  4. Listen to music and see Vinyl Cast match songs!

After doing the above, the app doesn't immediately crash after selecting a cast device anymore...now it successfully matches and sends input music to the cast device(s). I'm not even using the UFO202--I'm just using the USB output from my turntable! The app does still crash for me when trying to change casting devices after one has already been selected. It's not a big deal as it does work with the initial selection, so worst case just restart the app and select the new cast device.

LeoHaps commented 6 years ago

I've got the app working now! I have not used UFO202 yet. But with the microphone of my Moto G5 it recognise the music that's playing on my computer and it's transmitting it to the chromecast.

I had forgot to put my Client ID and Tag in the MusicRecognizer.java

edad44 commented 6 years ago

@theendisfin did you ever figure out the "skipping" error when playback casting (i.e "torn into segments and compressed with silence in between")?

everything else is working for me on a Pixel XL, feel like i'm so close...such a cool idea for an app!

npitts5397 commented 6 years ago

@edad44 I've had the skipping issue with every device except my Pixel 2 XL (the app works great on there). I just made the assumption the older devices don't have enough CPU. If that's the case, it's really a bummer as I have a spare Nexus 6P I was hoping to use as a permanent caster for my turntable. Not sure why it would make a difference, but perhaps it's worth noting I'm just using the USB output of my turntable, not an external ADC.

gbutti13 commented 5 years ago

Hello, How to get a gracenote client_id , no answer from them ?

jfwyatt commented 5 years ago

Heard back from gracenote. They no longer have a developer option. Anyone know of an alternative way to get this to work? As @thefischerman said, song identification isn't as important compared to just being able to cast.

juoksija commented 5 years ago

Can you cast music without Gracenote license? If you can, how to get this app to work without the Gracenote? As @jfwyatt told you cannot get the license anymore and the vinyl-cast won't play music without it. Could you simply comment out some parts of the source code e.g. related to MusicRecognizer to cast music?

waxboys2978 commented 5 years ago

hi, that's my first comment ever here, i love the idea of that projet (cast a lp record to all my google home Speakers.), i download the stuff from this website to "compile" for my android but i didn't find how .. do i need to create a APK for each kind of Android cell phone (model, or version osf OS)??.. can someone can give me easier way to understand ?

thanks

aschober commented 5 years ago

Appreciate everyone's comments here helping each other out. I was able to spend some time to revive this project after a long hiatus.

I refactored the app to use better/faster/stronger native audio APIs using the Android Oboe library. Performance seems much improved on the different devices I'm able to test on (Pixel 3, Nexus 6, Nexus 5C).

I also removed the Audio ACR piece as looks like Gracenote no longer gives access to their SDK and as mentioned, this piece is really not needed for just streaming audio.

I uploaded an APK to the Releases section of the repo so folks can sideload the app without building it. As such, going to close this issue as original request was completed. Feel free to open new issues with other questions.