Spaces:
Running
Running
File size: 3,289 Bytes
96154e7 a3fdb3c 96154e7 a3fdb3c 96154e7 7f69677 e98b5e2 048c3fc db2bd16 048c3fc e98b5e2 a4afe51 5a007ca d1ed6b1 5bf19b3 8047063 5bf19b3 f076d8d 8047063 09be04f a4afe51 d1ed6b1 a4afe51 7f21bab 8047063 5bf19b3 a4afe51 5bf19b3 bd5e759 6bb0509 bd5e759 96f91bb 6bb0509 bd5e759 6bb0509 bd5e759 6bb0509 bd5e759 96f91bb 6bb0509 96f91bb bd5e759 6bb0509 bd5e759 96f91bb 6bb0509 6431bab 96f91bb 6bb0509 6431bab d1ed6b1 |
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
"""
constants.py
This module defines global constants used throughout the project.
"""
# Standard Library Imports
from typing import List
# Third-Party Library Imports
from src.custom_types import ComparisonType, OptionKey, OptionLabel, TTSProviderName
CLIENT_ERROR_CODE = 400
SERVER_ERROR_CODE = 500
# UI constants
HUME_AI: TTSProviderName = "Hume AI"
ELEVENLABS: TTSProviderName = "ElevenLabs"
TTS_PROVIDERS: List[TTSProviderName] = ["Hume AI", "ElevenLabs"]
HUME_TO_HUME: ComparisonType = "Hume AI - Hume AI"
HUME_TO_ELEVENLABS: ComparisonType = "Hume AI - ElevenLabs"
CHARACTER_DESCRIPTION_MIN_LENGTH: int = 20
CHARACTER_DESCRIPTION_MAX_LENGTH: int = 1000
TEXT_MIN_LENGTH: int = 100
TEXT_MAX_LENGTH: int = 1000
OPTION_A_KEY: OptionKey = "option_a"
OPTION_B_KEY: OptionKey = "option_b"
OPTION_A_LABEL: OptionLabel = "Option A"
OPTION_B_LABEL: OptionLabel = "Option B"
TROPHY_EMOJI: str = "π"
SELECT_OPTION_A: str = "Select Option A"
SELECT_OPTION_B: str = "Select Option B"
# A collection of pre-defined character descriptions categorized by theme, used to provide users with
# inspiration for generating creative, expressive text inputs for TTS, and generating novel voices.
SAMPLE_CHARACTER_DESCRIPTIONS: dict = {
"π§ Meditation Guru": (
"A mindfulness instructor with a gentle, soothing voice that flows at a slow, measured pace with natural "
"pauses. Their consistently calm, low-pitched tone has minimal variation, creating a peaceful auditory "
"experience."
),
"π Stranded Astronaut": (
"An astronaut in deep space communicating with a clear, precise voice with subtle radio distortion. "
"Speaking with controlled emotion, technical accuracy, measured pacing and thoughtful silences."
),
"π¬ Noir Detective": (
"A 1940s private investigator narrating with a low, gravelly voice and deliberate pacing. "
"Speaks with a cynical, world-weary tone that drops lower when delivering key observations."
),
"π―οΈ Victorian Ghost Storyteller": (
"A Victorian-era raconteur speaking with a refined British accent and formal, precise diction. Voice "
"modulates between hushed, tense whispers and dramatic declarations when describing eerie occurrences."
),
"πΏ British Naturalist": (
"A wildlife documentarian speaking with a crisp, articulate British accent and clear enunciation. Voice "
"alternates between hushed, excited whispers and enthusiastic explanations filled with genuine wonder."
),
"π Texan Storyteller": (
"A woman from rural Texas speaking with a warm voice and distinctive Southern drawl featuring elongated "
"vowels. Talks unhurriedly with a musical quality and occasional soft laughter."
),
"π΄ββ οΈ Pirate Captain": (
"A seafaring pirate captain commanding with a rough, weathered voice that varies from quiet growls to "
"authoritative shouts. Exaggerates consonants, particularly rolling Rs, when giving orders."
),
"π Surfer Dude": (
"A California surfer talking with a casual, slightly nasal voice and laid-back rhythm. Uses rising "
"inflections at sentence ends and bursts into spontaneous laughter when excited."
),
}
|