Use f-strings on constants for better readability (#260)

This commit is contained in:
帕斯卡 2024-10-09 10:19:00 +02:00 committed by GitHub
parent dfd4cab849
commit 209269ebf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,14 +2,8 @@
Constants for the Edge TTS project.
"""
BASE_URL = "speech.platform.bing.com/consumer/speech/synthesize/readaloud"
TRUSTED_CLIENT_TOKEN = "6A5AA1D4EAFF4E9FB37E23D68491D6F4"
WSS_URL = (
"wss://speech.platform.bing.com/consumer/speech/synthesize/"
+ "readaloud/edge/v1?TrustedClientToken="
+ TRUSTED_CLIENT_TOKEN
)
VOICE_LIST = (
"https://speech.platform.bing.com/consumer/speech/synthesize/"
+ "readaloud/voices/list?trustedclienttoken="
+ TRUSTED_CLIENT_TOKEN
)
WSS_URL = f"wss://{BASE_URL}/edge/v1?TrustedClientToken={TRUSTED_CLIENT_TOKEN}"
VOICE_LIST = f"https://{BASE_URL}/voices/list?trustedclienttoken={TRUSTED_CLIENT_TOKEN}"