Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Cozy is a modern audiobook player for Linux (github.com/geigi)
157 points by miles on Sept 7, 2020 | hide | past | favorite | 93 comments


Note: the readme was updated a few minutes ago stating that macOS support is discontinued.


Hey, I'm the developer of Cozy and I just noticed that Cozy got posted here and people are trying it on macOS. The version linked in the README was a very old version of Cozy which I tested on macOS 10.14. It was quite a hassle to build and it was not stable. Sadly it's a lot of work to package a GTK app for macOS, therefore I discontinued building it but I didn't update the readme. Sorry for anyone who tried it and got disappointed!


Please consider leaving a link to cozy_macos_0.6.7_beta3.dmg; the macOS version was actually the reason why I posted Cozy to HN ;-). Worked great under High Sierra and was perfect for setting up a simple audiobook system for a centenarian who has been stuck indoors for months.


Oh I see, sorry :) I'll add the link again with a proper note and some documentation about how I build the package. Maybe someone has the time to test it with the latest version :)


If you ever have a chance, someone might be interested in a quick writeup of the challenges you faced packaging a GTK3 app for macOS. Off the top of my head, Inkscape ships an app with GTK3 and Python for macOS.


Here is a quick writeup of the steps I've done to build Cozy for macOS: https://gist.github.com/geigi/a3b6d661daeb7b181d3bdd3cab5170... Note: The last time I've done this is almost two years ago, some things might be different by now.


I still have documentation of the progress. It probably needs some work before it's useful to others but maybe it helps someone :)


I believe inkscape no longer supports macOS.

I don't use mac though, so haven't confirmed what I've heard.


Inkscape recently (with 1.0) completed their switch from XQuartz to a native 64-bit signed/notarized Mac app.


Ok, we've booted macOS from the title above.


If only they had written it in Electron.


I wish audiobook apps had bookmarking. I often fall asleep to audiobooks and have to scrub around trying to find my place next time I want to listen. A visual bookmark unrelated related to playback position would be so handy. Seems like obvious functionality to me, does anyone know of an iOS player that does this?


Some OS-wide integration with sleep trackers would be great. While I've read that apparently these trackers are not so accurate, my experience with the Sleep Cycle app has been that it's probably accurate enough to detect me falling asleep, especially since I have a tendency to actively shake my phone if I'm motionless but awake for a while.

As others have mentioned, some kind of 'stay awake' feature would probably solve the issue too. I'm thinking a non-intrusive beep or shake the indicate that the phone is about to go into 'sleep mode', which can be dealt with by some feedback. the interval could then be set in the app or OS settings.

The nice thing about doing this system-wide is that it could do all sorts of other stuff: turn off notifications (I sometimes forget and get rudely awakened at night), go into low-battery mode, turn off the screen (in case I forget to put it facing down), etc.


I use a combination of Sleep as Android, Tasker, and my Pebble smartwatch to detect roughly when I fall asleep and issue a system-wide media pause signal.


I tackle this by setting the sleep timer in my app of choice, Listen, to fifteen minutes. As the counter winds down it plays a few low-pitched beeps over the last 30 seconds of play and if it detects any movement during that time it resets the timer for another fifteen minutes. It's easy enough to work out where you're up to in a small range.

It also has bookmarks but I never use them.

https://play.google.com/store/apps/details?id=com.acmeandroi...


For Android there is Voice: https://github.com/PaulWoitaschek/Voice


I highly recommend [Smart audiobook player](https://play.google.com/store/apps/details?id=ak.alizandro.s...). It has loads of smart little features like bookmarks, headphone button controls equaliser etc.


That's my go-to audiobook player also. I have been using it for years and it never ceases to amaze me. The level of control you reach with it almost makes the audio part more paper like.


Vlc at least on linux and android does something similar. If you open a file that you recently played but not finished, it asks if you want to start from where you left off.


This is one of the reasons why I dislike listening to audio books or podcasts at night. You drift off and have no idea at which point. :)


Yes. Presumably this is what the sleep timer is for, though of course you must remember to set it before you drift off. I imagine you could design a feature where every x_interval you check to see if the user is awake and require a user action to continue playing, but then how do you make it so this isn't annoying during normal use?


Audible is really bad at this. If I set a timer for 15 minutes, and am still awake, I press play (since it pauses). But then it plays without having set a new timer. So to not have it play for hours while I sleep, I then have to take out my phone, look at the bright display, and set a new timer for 15 minutes.

Why cannot pressing play in this instance be like a reverse snooze??


Smart Audiobook Player (Android) has an automatic sleep mode. Also you don't have to press the play button, it indicates the end (fading audio, beep) and you just have to shake/move the device to keep it going, so you don't have to open your eyes at all. It's fantastic.


Does the sleep timer leave a marker for where you set it? Need to double check this, I feel I’ve noticed it before but not consistently enough to know it’s a thing.


At best that still gives you a range to seek through. I'm also not sure if on spotify it saves the location at which I set the sleep timer.


Word search would be great to find your place again. Type some words into the text field, and each one gets underlined in a different color, and it draws colored dots (or a heatmap) on the timeline where those words occur. Up and down arrow keys skip to the next and previous.


Same thing for podcasts. I'm actually working on an app to do that, not only "audio bookmarks" but "audio tagging" as well. Associate bookmarks and tags with specific points in time in the audio.


if you could implement some kind of 'are you asleep' feature like this (https://news.ycombinator.com/item?id=24397750) I might just buy such an app :).


I'm working on a desktop app, so sleep tracking might not be that useful ;)


Audible does. I believe it even syncs it with your Kindle books, if you purchased both versions.

I was surprised when I saw the Apple Books app didn't have that feature. Seems like a no-brainer to include.


Audiobooks in Kindle is at linked to the text, so its easier to skim pages for where you dozed of. Best solution I've found so far.


couldn't this be solved by integration with fitbit and other health trackers? pause player when tracker detects user is asleep or out of range of device.


Do people source audiobooks from somewhere that they can use clients like this? I use audible but don't know of a good alternative.


Stripping Audible DRM is surprisingly easy. Download via the desktop, and run a single docker command:

    docker run -v $(pwd):/data ryanfb/inaudible@sha256:b66738d235be1007797e3a0a0ead115fa227e81e2ab5b7befb97d43f7712fac5
The resulting m4b file has proper chapters, so works everywhere, but I tend to split it further[0],[1]

[0]: https://github.com/captn3m0/Scripts/blob/master/split-by-aud...

[1]: https://github.com/captn3m0/Scripts/blob/master/split-audio-...


I've used https://openaudible.org/ to download my Audible library before, if you want a fairly simple GUI.


If you don't want to pay $12 for a GUI nor use Docker:

1. This tool can be used to extract your encryption keys: https://github.com/inAudible-NG/audible-activator

2. ffmpeg -activation_bytes XXXXXXXX -i name.AAX name.mp3


If you're doing that you might prefer to output to opus instead. Speech compresses well so you get the benefit of smaller files and have more space for other media. Just replace name.mp3 with ..." -c:a libopus -b:a 24k name.ogg"


If you're going to use a less compatible format than mp3, it is far batter to just swap the container and not transcode it:

-i in.aax -c copy out.m4b

1. does not transcode 2. captures and retains all of the metadata


Yes, I'm usually strongly opposed to lossy transcodes, but for portable listening of speech heavy content on a space-limited device, that plays Opus easily, it can be a worthwhile trade-off for many.


I'm using Libro[0], which is essentially a DRM free Audible (including the membership!). It's a bit of a hassle to sign up without a North American Credit Card (you can only buy their membership with one, but you can gift it with a CC registered anywhere else, so I gifted myself one).

It lacks Audible exclusive titles (which are shockingly many!), though.

Before that, I used to strip the DRM from my audible books (easily doen using ffmpeg)

[0]: https://libro.fm


Downpour.com sell DRM-free audiobooks, but lately I noticed a couple of titles in their library that are DRM-protected, so I don’t know for how long that will last.

In their library I did find most of the titles I was interested in, selection is good, content is high quality, so I've been enjoying it.


This is the second time in jus t a few days that i've heard reference to downpour. (The first time was from Cory Doctorow on a recent TWiT episode: https://twit.tv/shows/this-week-in-tech/episodes/786?autosta...) I guess I'll have to check it out!


I've been meaning to try https://libro.fm. Maybe this is the nudge I need.


In addition there’s https://librivox.org/ for volunteer-read public domain books!


https://audiobookstore.com/ has a pretty extensive range of DRM-free titles.


Local and regional shops. Audible doesn't have some of the voices where I live, because it is regionally locked (I live in Sweden).


Library rips.


While the app looks great on Linux which is at least native to that system, it just doesn't run on macOS Catalina at all. Which means I don't have any idea on how it works or looks like on my system.

The size of the app is quite large for its functionality: 244.1 MB (Resources folder and MacOS folder take majority of application size.) which is puzzling. Given it uses GTK+, I don't think that it would look great on other systems if it is applying the GNOME theming / decorators to its windows. (Remember gedit on macOS / Windows?).

Given its still in beta and primarily uses GTK, I'd rather use this on Linux than on macOS. From what I have seen from other GTK+ apps, they just standout like a sore thumb on any other platform other than Linux. For cross-platform, I would use Qt5 instead.


Presumably the application bundle includes GTK, cairo, gstreamer, and Python. Dependencies add up, y'know?

Comparing to an Electron app, the bundle is likely smaller and resource usage lower, with little difference in theming.


Syncing times, and book downloads for that matter, across multiple platforms is a critical feature for me. Which is why I’m sadly stuck using Audible's flakey apps.

Offtopic, but this reminds me of how Audible in general (website, purchasing UX, etc) always feels half broken. It mostly works but small bizarre things ruin it (most recently a purchased book disappearing while marked as purchased in the store requiring manual support intervention). I often wonder if it's half abandon ware since they now have a monopoly and it's using some ancient Java backend.


Since audiobook enthusiasts might be in this thread ... does anyone know of a product (outside Kindle Whispersync) that can ingest an audiobook and the corresponding e-book and using speech-to-text keep them roughly in sync so you can quickly go between the two?


It's not a trivial task to implement. There are three stages:

- Speech-to-text. It has to be good, or the text you get back is unusable. Google's and Amazon's services for that will quickly become expensive for large volumes. And you need to mark text with time/position if you want ebook-to-audiobok sync.

- Diff algorithm between generated text and ebook text. Audiobooks are not produced from the same source material as ebooks, and they will have differences. On top of that you get errors and changes by narrators, and errors from speech-to-text. Not trivial if you want high fidelity.

- Figuring out the position in ebook from the diff. Relatively simple.

For ebook-to-audiobook you need to find the position in the speech-to-text conversion, and rewind to the time/position marking in that.

Storytel (disclaimer: I work at Storytel) has quite a few ebooks and audiobooks connected, but doesn't allow you to ingest your own ebooks and audiobooks.


interesting - read a lot of good things about you at the New Publishing blog

that guy thinks you are going to be very big

all the best. We sure need more people doing ebooks and audiobooks. Amazon is @#$#$ authors with all their exclusivity requirements and insanely high cut that they take


Thanks! We're trying!

The whole audiobook landscape isn't clear cut yet. In music and video you have a few well-established (entrenched?) players: Amazon, Google, Apple, Spotify (music). In audiobooks there are still a bunch of smaller players alongside Amazon (Apple doesn't do much about audiobooks, other big players are only just starting, see Spotify). There are at least three in every country, I think :)

And the whole thing is further fractured by whether or not publishers and rights holders want to provide their audiobook, and ebooks, or only one or the other. And there are way more publishers and rights holders than there are in music (in music they are also mostly consolidated into a few megamonsters [1]).

And the market is still growing, as more and more people discover and listen audiobooks (and related material like podcasts) during commute, in the car, during daily routines and so on.

So yeah, it's stressful, but interesting :)

[1] https://en.wikipedia.org/wiki/Record_label#3


You wouldn’t need good speech to text. The purpose would only be to establish synchronization between audio and text, and where you don’t have synchronization you could assume that the speaker is carrying on at their normal words per minute.


> The purpose would only be to establish synchronization between audio and text

To establish synchronisation you need to have, well, two texts and a way to compare them ;)

> where you don’t have synchronization you could assume that the speaker is carrying on at their normal words per minute.

What is their normal WPM and how would you calculate that? ;)


I take my audible files, split them by chapter, and then manually jump to that chapter after checking in my audiobook player.

Even syncing progress b/w ebook readers is a pain point for me right now[1], but I'd love to see solutions for this.

[1]: https://github.com/johnfactotum/foliate/issues/584


https://github.com/readbeyond/aeneas can output SMIL e-books where each line of text is associated with the corresponding segment from the audiobook. But I don't know which e-book readers support that format.


I'm not using it, but isn't this something like the stuff you are looking for? https://en.wikipedia.org/wiki/Digital_Accessible_Information...


Just a quick thank you to the author.

I've been putting off looking for an audiobook reader for linux to improve my german. HN makes life easier ;)


This looks great, nice job!

As an aside: does anyone know of an audiobook organiser? Essentially Calibra for audiobooks. Preferably with a web interface for running in my home server. I’ve tried booksonic, and found it very clunky and lacking proper organisational features.



Not an audiobook organizer, but I use EasyTAG to tag my audiobooks before importing them to Cozy: https://wiki.gnome.org/Apps/EasyTAG/


I use Jellyfin as an open source alternative to Plex. I personally don't have any audio books on my home server, but it has support for them.


Oh really? I use Jellyfin also, but I never knew it supported audiobooks!


I ended up using m4b-tools to organize and tags files in folders with Plex as front end and Prologue (iOS) as my preferred player.


Definitely, thanks for going with native toolkits.


Just want to thank you for not writing this app in Electron. We need more such examples of using proper desktop app frameworks for writing desktop apps.


A bit ironic that you made this comment, and then the author mentioned in this thread that Mac OS support is discontinued because it was too much work to maintain.

Which probably wouldn't have been such an issue with electron.


It might be ironic, but overall I think it's fine that it wasn't written in Electron.

For a user-specific application like a player, I would rather use a desktop app developed exclusively for a specific OS or set of OSes that works well with those. There are millions of Mac apps that have no equivalent on Linux, so I'm glad to see a developer focusing exclusively on Linux.

Electron for cross-platform apps works well when you are going to be forced into using it as a web client anyway due to proprietary platform lock-in, e.g. Slack.


Note that using electron is no guarantee that you'll be able to target apple devices, see: https://news.ycombinator.com/item?id=21437255

Currently the best way to build something for Apple devices (outside of owning Apple hardware) seems to be usage of CI.


It's gotten to the point where I don't even look at projects anymore until I can find comments that confirm there isn't any electron involved.


Mhm.

>Hey, I'm the developer of Cozy and I just noticed that Cozy got posted here and people are trying it on macOS. The version linked in the README was a very old version of Cozy which I tested on macOS 10.14. It was quite a hassle to build and it was not stable. Sadly it's a lot of work to package a GTK app for macOS, therefore I discontinued building it but I didn't update the readme. Sorry for anyone who tried it and got disappointed!

https://news.ycombinator.com/item?id=24397232


Does anyone know a spotify-audiobook-client? What I'm thinking of is a website or app that lets you listen to audiobooks that are on spotify and saves your position per book, lets you browse and search only books without the music. I was thinking of writing something like that myself, but maybe someone already did?


How do you find them on Spotify at the moment? Is it just by searching "audiobook" and then shifting through all the random stuff that brings up, some of which are audiobooks?

EDIT: I've just found https://community.spotify.com/t5/Content-Questions/Audiobook... which says

> In Browse > GENRES& MOODS > WORD you can now find these options.

Which should be available through their API using https://developer.spotify.com/documentation/web-api/referenc... It's not immediately obvious how I get to the Browse section through the awful interface at https://play.spotify.com but you can jump straight to https://open.spotify.com/genre/word-page


That doesn't show a lot for me (maybe because of my country?), just some "popular" playlists. There are a lot more audiobooks on spotify. I haven't solved this when I thought about it a while back but my idea was to use some external source (like amazon) and then search for the book/author and see if I find an album with a total length that would match an audiobook.


I agree that it's missing stuff. I only had a quick glance and I could not find the Sherlock Holmes books in those playlists but the audiobooks are definitely on Spotify. I think it's a tricky problem to solve without better Spotify support.


Yes it's tricky, but that also means that there is some value in there. If someone wrote something to solve that, there is of course also the risk that spotify finally discovers audiobooks as part of their service and solves that problem for all users, making the 3rd party site/app obsolete.


Do you know if there is any open API for that? Last time I checked the API for doing pretty much anything else than play a specific song/album/playlist wasn't there. Maybe the API for books are different?


I didn't look much into the details so I might be wrong but it looked doable. Search is there, play and resume from some timepoint. So with some search "magic" to find and filter audiobooks it might be possible.


On macOS, what distinctions does this have from playing audiobooks in the built-in Books app?


The mac version is discontinued, per the README. Someone should edit the title.


in the first line in the main.py there is this shebang:

#!@PYTHON@

this is different of what I know about shebangs in Python


That is because this file hasn't been "built" yet. When building, @PYTHON@ with the path to Python. This is because it's very hard/impossible to actually get something to put there that works on every OS


Isn’t that why we use #!/usr/bin/env python3 and let the virtual environment sort it out?

(I know, gtk is a pain in virtualenvs)


I've seen machines where there is no python3, only python. But then on other machines there is a python3, and python is python2


Are there any audiobook players that can work across devices in sync? I've been trying to set this up with Kodi, but have had little success.


Unrelated, but whats with these gstreamer dep names?

  gstreamer1.0-plugins-good
  gstreamer1.0-plugins-bad
  gstreamer1.0-plugins-ugly


This mirrors some other Debian/Ubuntu package names where:

- "Good" plugins/codecs are ones that are freely distributable, FOSS and well maintained.

- "Bad" are ones that are not up to par quality wise (messy code, no code reviews, no documentation, ugly hacks, etc.)

- "Ugly" are the ones that might not be legally distributable in some world countries due to patents or licenses.


EDIT: my first comment was from memory and I googled to double-check. Seems I was wrong and they're actually stability ratings.

Ignore below

---

the suffixes are related to codec licencing afaik

For example, foss purists might like to install `-good` whereas those who prefer all video sources to "just work" will also want `-ugly`


I've been searching for something like this for a very long time! Nice to know it exists :)


Anyone know of anything like this but for Windows?


If you don't mind lack of fancy book covers I recommend VLC.

Free, open source, cross platform including mobile and remembers where I stopped listening.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: