Serverseitige Sprachsynthese (deutsche Thorsten-Stimme, Piper) für den EPUB-Reader: /tts/synthesize/ nimmt einen Satz (max. 500 Zeichen) entgegen, synthetisiert und streamt WAV zurück, ohne zu persistieren, zu loggen oder zu cachen — eine bewusste, eng begrenzte Ausnahme vom "Server sieht nie Klartext"-Prinzip (siehe CLAUDE.md). Der neue ▶-Button im Reader-Header liest ab der aktuellen Position satzweise vor, hebt den gerade gesprochenen Satz hervor und scrollt mit; eine kleine Leiste bietet Pause/Stop. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xb6yX2S9aTGepYA9JFba9x
24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.views.static import serve as serve_static
|
|
|
|
from accounts.sync import sync_snapshot
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('accounts/', include('accounts.urls')),
|
|
path('podcasts/', include('podcasts.urls')),
|
|
path('books/', include('books.urls')),
|
|
path('tts/', include('tts.urls')),
|
|
path('api/2/', include('gpodder.urls')),
|
|
path('api/sync/', sync_snapshot, name='api_sync'),
|
|
# Served at the root (not /static/js/sw.js) so its default scope covers
|
|
# the whole app — a service worker's scope is limited to its own script's
|
|
# directory unless the server sends Service-Worker-Allowed, so registering
|
|
# it from under /static/js/ silently restricted it to that subpath and
|
|
# navigations to '/', '/books/' etc. were never intercepted while offline.
|
|
path('sw.js', serve_static, {'document_root': settings.BASE_DIR / 'static' / 'js', 'path': 'sw.js'}),
|
|
path('', include('radio.urls')),
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|