File size: 1,562 Bytes
5ed9749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Standard Library Imports
from typing import List

# Third-Party Library Imports
from .common_types import ComparisonType, OptionKey, TTSProviderName

HUME_AI: TTSProviderName = "Hume AI"
ELEVENLABS: TTSProviderName = "ElevenLabs"
OPENAI: TTSProviderName = "OpenAI"

TTS_PROVIDERS: List[TTSProviderName] = [HUME_AI, OPENAI, ELEVENLABS]

HUME_TO_HUME: ComparisonType = "Hume AI - Hume AI"
HUME_TO_ELEVENLABS: ComparisonType = "Hume AI - ElevenLabs"
HUME_TO_OPENAI: ComparisonType = "Hume AI - OpenAI"
OPENAI_TO_ELEVENLABS: ComparisonType = "OpenAI - ElevenLabs"

TTS_PROVIDER_LINKS = {
    "Hume AI": {
        "provider_link": "https://hume.ai/",
        "model_link": "https://www.hume.ai/blog/octave-the-first-text-to-speech-model-that-understands-what-its-saying"
    },
    "ElevenLabs": {
        "provider_link": "https://elevenlabs.io/",
        "model_link": "https://elevenlabs.io/blog/rvg",
    },
    "OpenAI": {
        "provider_link": "https://openai.com/",
        "model_link": "https://platform.openai.com/docs/models/gpt-4o-mini-tts",
    }
}

CHARACTER_DESCRIPTION_MIN_LENGTH: int = 20
CHARACTER_DESCRIPTION_MAX_LENGTH: int = 400

TEXT_MIN_LENGTH: int = 100
TEXT_MAX_LENGTH: int = 400

OPTION_A_KEY: OptionKey = "option_a"
OPTION_B_KEY: OptionKey = "option_b"

SELECT_OPTION_A: str = "Select Option A"
SELECT_OPTION_B: str = "Select Option B"

CLIENT_ERROR_CODE = 400
SERVER_ERROR_CODE = 500
RATE_LIMIT_ERROR_CODE = 429

GENERIC_API_ERROR_MESSAGE: str = "An unexpected error occurred while processing your request. Please try again shortly."