mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Feature Request] Amazon Echo skill for AudiobookShelf #180
Open
opened 2026-04-24 23:00:15 +02:00 by adam
·
42 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
playlists
video
v2.35.1
v2.35.0
v2.34.0
v2.33.2
v2.33.1
v2.33.0
v2.32.1
v2.32.0
v2.31.0
v2.30.0
v2.29.0
v2.28.0
v2.27.0
v2.26.3
v2.26.2
v2.26.1
v2.26.0
v2.25.1
v2.25.0
v2.24.0
v2.23.0
v2.22.0
v2.21.0
v2.20.0
v2.19.5
v2.19.4
v2.19.3
v2.19.2
v2.19.1
v2.19.0
v2.18.1
v2.18.0
v2.17.7
v2.17.6
v2.17.5
v2.17.4
v2.17.3
v2.17.2
v2.17.1
v2.17.0
v2.16.2
v2.16.1
v2.16.0
v2.15.1
v2.15.0
v2.14.0
v2.13.4
v2.13.3
v2.13.2
v2.13.1
v2.13.0
v2.12.3
v2.12.2
v2.12.1
v2.12.0
v2.11.0
v2.10.1
v2.10.0
v2.9.0
v2.8.1
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.23
v2.2.22
v2.2.21
v2.2.20
v2.2.19
v2.2.18
v2.2.17
v2.2.16
v2.2.15
v2.2.14
v2.2.13
v2.2.12
v2.2.11
v2.2.10
v2.2.9
v2.2.8
v2.2.7
v2.2.6
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.24
v2.0.23
v2.0.22
v2.0.21
v2.0.20
v2.0.19
v2.0.18
v2.0.17
v2.0.16
v2.0.15
v2.0.14
v2.0.13
v2.0.12
v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v1.7.2
v1.7.1
v1.7.0
v1.6.0
v1.5.5
v1.5.0
v1.4.11
v1.4.9
v1.4.7
v1.4.6
v1.4.4
v1.4.2
v1.4.0
v1.4.1
v1.3.4
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#180
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lukc82 on GitHub (Jan 15, 2022).
Hi,
It would be great to be able to control the audiobookshelf using Alexa :)
Thanks,
Luke
@advplyr commented on GitHub (Jan 15, 2022):
This sounds like a fun project. I just skimmed through the documentation since I'm not familiar with Alexa.
Have you used Alexa for other self-hosted media servers? If so, I'm curious how the setup is handled. How does Alexa get your server address and login credentials for the media server?
@lukc82 commented on GitHub (Jan 15, 2022):
Yes. I'm using MyMedia for Alexa (https://www.mymediaalexa.com/) and I'm
surprised that since the launch of this project, it has been the only
mature alternative for listeners of self hosted audiobook files. Especially
for kids it's a wonderful tool. One word or sentence and there you go -
your audiobook continues :)
On Sat, Jan 15, 2022, 21:05 advplyr @.***> wrote:
@mx03 commented on GitHub (Jan 16, 2022):
Alexa needs a public audiobookshelf instance, additional it needs a central system ( e.g. audiobookshelf.org with oauth thats linked to the instance of the user).
An alternative is that everyone deploy an skill with the alexa developer console that direct linked to the audiobookshelf instance.
But alexa always need the audiofiles on an public url even the abs and the alexa is on the intranet.
@advplyr commented on GitHub (Jan 16, 2022):
Yeah I thought that might be the case. Although if Alexa knew your server url and audiobookshelf login then I don't see why it would require a central server.
@mx03 commented on GitHub (Jan 16, 2022):
Yes thats the problem, alexa don't know the server url, if you publish an alexa skill you can link your amazon account with the server url that's in the skill.
Problem you can't pass the url to the server as a alexa user. There are two options:
@advplyr commented on GitHub (Jan 16, 2022):
Sounds like this one will be something to look at again once the project is more mature.
I'm open to hosting a central server if it allows us to add certain features as long as it is opt-in only and transparent.
@oboe45 commented on GitHub (May 7, 2023):
Very pleased with Audiobookshelf - works perfectly for me except for the lack of Alexa or Siri operability. Happy to contribute as a tester, but have no current skills to offer, unless you can make use of an IBM 360 assembler programmer from the 60’s!
@adocampo commented on GitHub (Jul 3, 2023):
Just my two cents, I'm not a developer or whatsoever, but I set up a Lambda function to manage my Home Assistant, so I think there is no need at all for a "central server", if we, the users, have the steps to configure our own AWS Developer account and create a program with the free tier with a lambda function which connects to our ABS instance.
We will need, besides the logic of the lambda function, which can be done in python or another programming language, a domain (I guess it can be done with free domains like no-ip.org) and publish ABS via https (which can be get with letsencrypt).
It would be great to let alexa play any book or podcast on our ABS, and start reading where it left (MyMediaForAlexa doesn't do that).
@zimler commented on GitHub (Jul 29, 2023):
This would be a really cool addition to an already amazing project.
@yann-papouin commented on GitHub (Sep 30, 2023):
I've already made a self-hosted python's Alexa skill to play my children bed-stories and since I've now started self-hosting audiobookshelf (amazing app by the way) I was looking for a way to replace my http-files backend with it.
I took a look on https://api.audiobookshelf.org but I didn't found a way to get all titles/authors in the library (
api/items/batch/get?) or to make a content fuzzy search: convert user query to phonetic and compare it with all titles/authors (stored in phonetic too) using a levenshtein distance.@dathbe commented on GitHub (Dec 20, 2023):
I too would love this functionality. Plex is able to play self-hosted files through Alexa, though they obviously have a central point they can direct Alexa to and then distribute out to the specific server based on login information.
Some creative folks have come up with a way you can develop your own personal Alexa skill to link with the Subsonic API. https://github.com/rosskouk/asknavidrome . This could presumably be done for ABS as well.
The challenge would be, as others have pointed out, scaling this to a single production app that works for everyone's self-hosted server.
I don't have a lot of experience developing Alexa skills (I was able to get the asknavidrome skill working, but that's it). I know you can log in to skills. So it would presumably be possible to keep a central database of user logins that associate with self-hosted urls that allow connection to a skill. This has some privacy (and hosting) implications. So it would be interesting to know if, instead of just logging in, it is possible to develop a production alexa skill that requires configuration with a server address...like we do with the iOS app now. Not sure.
@DavidPesticcio commented on GitHub (Apr 11, 2024):
Perhaps Alexa could be decoupled from the ABS server by using some no-code like Zapier in between, additionally using the cloudflared tool to expose the ABS server for added security/proivacy...?
@amwmedia commented on GitHub (Sep 12, 2024):
Does anyone here have experience with getting an Echo device to play from ABS? I'm exploring into making an ABS skill and I've been able to get the Alexa app on my phone to play the HLS stream, but when I try the same skill on an echo dot there's no audio. I'm wondering if there's something incompatible with the transport stream, codec being used, etc? Anyway, thought I'd ask here in case someone else has run into this before.
@oboe45 commented on GitHub (Sep 12, 2024):
I would love to see a skill that works for ABS access - I asked about this
several times and the feedback was that it was relatively simple, but no
one actually provided the "simple" solution. Good luck, happy to test any
solution provided.
On Thu, Sep 12, 2024 at 8:59 AM Andrew Worcester @.***>
wrote:
@oboe45 commented on GitHub (Sep 13, 2024):
This was a comment from a couple of years back on this thread. Audiobookshelf is presumable sufficiently "more mature" now! Alexa is also very mature.
Is there anything that can be done to promote activity on an Alexa voice command set to Audiobookshlef?
@dathbe commented on GitHub (Sep 13, 2024):
It's not the easiest thing in the world to do because there's no central hub to register with Amazon (e.g., audible.com). It is possible, but it generally requires getting an Amazon dev account and setting up your own integration. That's cumbersome and has its own limitations. There are some theoretical workarounds, but it's not as straightforward as you might assume. Some folks have tried it with music and Navidrome. It works, but not really well.
@amwmedia commented on GitHub (Sep 13, 2024):
The problem is made even more difficult when you consider that the skill would need to be setup for every account that wants to listen on Alexa using ABS. Meaning that it can't just be setup once and used by my nieces and nephews... we would need to setup a separate skill for THEM as well.
What I'm planning to build (if I can get the darn thing to play on devices) is a system that would make it simple to install the skill and link it to your ABS instance and credentials. This wouldn't be an OSS project but rather a service for a minimal cost. Hopefully something like this would be welcomed by the ABS community even though it goes against the "self-hosted", free, and open source nature of the project.
@oboe45 commented on GitHub (Sep 13, 2024):
Depends on the price, but likely to subscribe here
On Fri, Sep 13, 2024 at 3:10 PM Andrew Worcester @.***>
wrote:
@P-Hoep commented on GitHub (Sep 19, 2024):
Hm, actually have something like this close to ready for beta testing (assuming amazon lets me get that far). Nothing super fancy but seems to work alright. Having difficulty with fast forwarding/skipping chapters though (probably need to rewrite some of the url handling or find another stream option) Could probably clean up and share code if anyone is interested. It's fairly basic rn. Am using 0auth to store credentials and have it linked to the app.
@amwmedia commented on GitHub (Sep 19, 2024):
@P-Hoep I'd love to take a look. I'd be very interested to see how you got the stream to play on an echo device. I'm sort of stuck there right now. It plays fine on the Alexa app but I get nothing on a real device. 😭
@oboe45 commented on GitHub (Sep 20, 2024):
Cool, I'll check it out!
On Thu, Sep 19, 2024 at 4:29 PM P-Hoep @.***> wrote:
@mx03 commented on GitHub (Oct 5, 2024):
Do you use the transcoded hls stream from abs?
Every echo dot I tried has issues with m3u8 files that are bigger than 1MB (independent of http compression).
I can upload my skill and everything around if you want some input.
@amwmedia commented on GitHub (Oct 5, 2024):
@mx03 I'd be happy to take a look. Interesting info about the file size. I might do some testing to verify if that's actually the issue with the playback issues
@mx03 commented on GitHub (Oct 6, 2024):
This is only a simple demo for alexa skill and abs, dont use it in production it may delete your audiobook progress.
The ABS mirror server must run in public with tls on port 443, as its not secured with authentication only run it while testing. (i use a wildcard cert like https://9f9d118ded5842475203d0d199143767b19a7a55.mydomain.com against random bot calls, with caddy in front)
ABS Mirror: https://gist.github.com/mx03/6ada5ce72d3389bc386086aafa1e627e
Alexa Lambda Skill: https://gist.github.com/mx03/56da94b7c7598e0d80eff9e48673c9e6
This skill play the lastest unfinished item, can be paused and resumed progess is synced with abs.
The problem with abs m3u8 is the token parameter e.g.
abs original (1,5MB for a 15h book):
https://gist.github.com/mx03/02d9628415d3a051a01e7ab355207c08
without token (232KB for 15h)
https://gist.github.com/mx03/fc83949b8d5f899062cf2610b7a63295
The main part of the mirror rewrites the m3u8 and return the file within a subfolder with the token, and every output-X.ts get requested with the path with the token without bloating the m3u8.
https:/example.com/hls/c4ce22cf-6623-446e-bedb-84d6c0d6e56b/MffwI1aRX0iRaVGxRf9YQJVXsLxnSUHZAYJkbVfXxFMk2MFH690patqXcJ1mpVR4jMndnxGtNOII3IwcQCTqSNxujjS2qE8qWzeizQfOz95nMO5Wics1rgfOpYe8KWFuYCxXEbsKVsAhzw2BypRMco/output.m3u8@mxdalchau commented on GitHub (Dec 15, 2024):
nice ideas .. is there a solution for the problem?
@amwmedia commented on GitHub (Dec 15, 2024):
There are some open source projects out there (some referenced here) that will work. I'm working on a project to solve this. I'll post here once I'm ready for beta testers 😉
@adocampo commented on GitHub (Dec 16, 2024):
I would be glad to betatest it ;)
@alaenghits commented on GitHub (Dec 18, 2024):
Would love to see this.
@sdholden28 commented on GitHub (Dec 19, 2024):
I'll add to the chorus. Would love to see this.
@eastoncrafter commented on GitHub (Dec 30, 2024):
Another!
Willing to beta test, have quite a few echo's and the dev console
@ajlennon commented on GitHub (Jan 6, 2025):
Yes please !!!
@CephandriusMaxtori commented on GitHub (Mar 28, 2025):
I can beta test too. i have multiple alexa and one at a diffrent home.
@neuther commented on GitHub (Oct 11, 2025):
I have plexamp and it isn't good for paying audiobooks. I love audiobookshelf but I don't like that I don't have my books when I'm not at home. I was wondering if there's a way to have audiobookshelf use my plexamp library?
@Blackspell01 commented on GitHub (Mar 12, 2026):
what happened?
@Blackspell01 commented on GitHub (Mar 12, 2026):
@mx03 your skill starts any audiobook from the beginning so its useless for me unfortunately...
@amwmedia commented on GitHub (Mar 13, 2026):
I got busy unfortunately. Hoping to resume work on this sometime this year. I'll report back here when I have something.
@mx03 commented on GitHub (Mar 14, 2026):
There where some issues that blocked me and as I didnt have time i didnt looked into it.
Biggest problem was/is that if you created a hls session it regenerated the complete hls stream and that breaks something sometimes in alexa, depending how long it takes to generate the stream (results: starting from the beginning or not playing the stream at all)
Best solution would be another hls stream caching and it only get deleted after some time or if the max cache size is reached.
@Blackspell01 commented on GitHub (Mar 14, 2026):
Why isn't it possible to build a proxy that only serves the hls parts from the current chapter on respectively?
@mx03 commented on GitHub (Mar 14, 2026):
If i remember correct abs already start encoding in the range of the last progress first, hls has e.g. 1000 output-[NUMBER].ts files and if you already at 50% it start at output-4xx.ts first, but alexa had a issue with it because it always read some output-[0-10].ts regardless at which progess you are, but the files arent ready (or maybe i did something wrong)
Main problem in my eyes is, if i start a session for a book with forcetranscode (hls) if there is already a existing hls stream for this entry it deletes it and generate again. (Its a useless additional transcode)
@Blackspell01 commented on GitHub (Mar 15, 2026):
hmm, okay, so recreating a m3u8 file that starts at 50% and also renames the ts parts to 0 wouldnt help either in this case?
@mx03 commented on GitHub (Mar 16, 2026):
@Blackspell01 Can you explain how you tried/setup my skill with everything around?
@Blackspell01 commented on GitHub (Mar 17, 2026):
skill hosted on Alexa and your proxy in a lil docker container
FROM node:20-slim
WORKDIR /app
COPY package.json ./
RUN npm install --omit=dev
COPY index.js ./
CMD ["node", "index.js"]