tts-voice-creator-clone-and.../scratch/test_cache.py
mARTin-B78 b43bacc275
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
chore: add local maintenance utilities
2026-09-09 07:53:13 +02:00

14 lines
553 B
Python

import urllib.request
import urllib.parse
import json
book = "Hohlbein Hennen - DSA - Das Jahr des Greifen 03 - Die Amazone"
url = f"http://127.0.0.1:8010/api/line-audio/{urllib.parse.quote(book)}/check"
data = json.dumps({"keys": ["c79dbe84b9ed7b1780891ba905951bb6", "ee3559287060ae3530fb9d7f088ff9c8"]}).encode('utf-8')
req = urllib.request.Request(url, data=data, headers={'Content-Type': 'application/json'}, method='POST')
try:
with urllib.request.urlopen(req) as f:
print(f.read().decode('utf-8'))
except Exception as e:
print(e)