Spaces:
Running
Running
File size: 3,042 Bytes
96154e7 a3fdb3c 96154e7 a3fdb3c 96154e7 db2bd16 5a007ca d1ed6b1 8047063 a3fdb3c 5adc4ce 8047063 d1ed6b1 8047063 ca266e0 d1ed6b1 bc5091e 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 |
"""
constants.py
This module defines global constants used throughout the project.
"""
from src.types import OptionKey, TTSProviderName
# UI constants
HUME_AI: TTSProviderName = "Hume AI"
ELEVENLABS: TTSProviderName = "ElevenLabs"
UNKNOWN_PROVIDER: TTSProviderName = "Unknown"
PROMPT_MIN_LENGTH: int = 10
PROMPT_MAX_LENGTH: int = 400
OPTION_A: OptionKey = "Option A"
OPTION_B: OptionKey = "Option B"
TROPHY_EMOJI: str = "π"
VOTE_FOR_OPTION_A: str = "Vote for option A"
VOTE_FOR_OPTION_B: str = "Vote for option B"
# A collection of pre-defined prompts categorized by theme, used to provide users with
# inspiration for generating creative text for expressive TTS.
SAMPLE_PROMPTS: dict = {
"π Dramatic Monologue (Stranded Astronaut)": (
"Create a poignant final transmission from a lone astronaut on Mars to mission control. "
"Voice: low, measured pace, with subtle tremors of emotion. Content should move from "
"awe-struck description of the Martian sunset to peaceful acceptance. Include natural "
"pauses for emotional weight. Keep the tone intimate and contemplative, as if speaking "
"softly into a radio mic. End with dignified finality."
),
"π Poetic Sonnet (The Passage of Time)": (
"Craft a sonnet about time's flow, suitable for measured, resonant delivery. "
"Voice: clear, rhythmic, with careful emphasis on key metaphors. Flow from quiet "
"reflection to profound realization. Include strategic pauses between quatrains. "
"Balance crisp consonants with flowing vowels for musical quality. Maintain consistent "
"meter for natural speech rhythm."
),
"π± Whimsical Children's Story (Talking Cat)": (
"Tell a playful tale of a curious cat's magical library adventure. "
"Voice: bright, energetic, with clear character distinctions. Mix whispered "
"conspiracies with excited discoveries. Include dramatic pauses for suspense "
"and giggles. Use bouncy rhythm for action scenes, slower pace for wonder. "
"End with warm, gentle closure perfect for bedtime."
),
"π₯ Intense Speech (Freedom & Justice)": (
"Deliver a rousing resistance speech that builds from quiet determination to powerful resolve. "
"Voice: start controlled and intense, rise to passionate crescendo. Include strategic "
"pauses for impact. Mix shorter, punchy phrases with flowing calls to action. "
"Use strong consonants and open vowels for projection. End with unshakeable conviction."
),
"π» Mysterious Horror Scene (Haunted Lighthouse)": (
"Narrate a spine-chilling lighthouse encounter that escalates from unease to revelation. "
"Voice: hushed, tense, with subtle dynamic range. Mix whispers with clearer tones. "
"Include extended pauses for tension. Use sibilants and soft consonants for "
"atmospheric effect. Build rhythm with the lighthouse's beam pattern. End with haunting "
"revelation."
),
}
|