openfree commited on
Commit
d66ebf7
·
verified ·
1 Parent(s): 598b963

Delete podcast_config.py

Browse files
Files changed (1) hide show
  1. podcast_config.py +0 -259
podcast_config.py DELETED
@@ -1,259 +0,0 @@
1
- # podcast_config.py - 설정 및 데이터 분리
2
- from dataclasses import dataclass
3
- from typing import List, Dict
4
-
5
- @dataclass
6
- class ConversationConfig:
7
- max_words: int = 8000
8
- prefix_url: str = "https://r.jina.ai/"
9
- api_model_name: str = "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
10
- legacy_local_model_name: str = "NousResearch/Hermes-2-Pro-Llama-3-8B"
11
- local_model_name: str = "Private-BitSix-Mistral-Small-3.1-24B-Instruct-2503.gguf"
12
- local_model_repo: str = "ginigen/Private-BitSix-Mistral-Small-3.1-24B-Instruct-2503"
13
- max_tokens: int = 6000
14
- max_new_tokens: int = 12000
15
- min_conversation_turns: int = 18
16
- max_conversation_turns: int = 20
17
-
18
- # Edge TTS 전용 언어 목록
19
- EDGE_TTS_ONLY_LANGUAGES = [
20
- "Korean", "Japanese", "French", "German", "Spanish", "Italian",
21
- "Portuguese", "Dutch", "Thai", "Vietnamese", "Arabic", "Hebrew",
22
- "Indonesian", "Hindi", "Russian", "Chinese", "Norwegian", "Swedish",
23
- "Finnish", "Danish", "Polish", "Turkish", "Greek", "Czech"
24
- ]
25
-
26
- # 전체 지원 언어 목록
27
- SUPPORTED_LANGUAGES = [
28
- "English", "Korean", "Japanese", "French", "German",
29
- "Spanish", "Italian", "Portuguese", "Dutch", "Thai",
30
- "Vietnamese", "Arabic", "Hebrew", "Indonesian", "Hindi",
31
- "Russian", "Chinese", "Norwegian", "Swedish", "Finnish",
32
- "Danish", "Polish", "Turkish", "Greek", "Czech"
33
- ]
34
-
35
- # 언어별 Edge TTS 음성 설정
36
- EDGE_TTS_VOICES = {
37
- "English": [
38
- "en-US-AndrewMultilingualNeural",
39
- "en-US-BrianMultilingualNeural"
40
- ],
41
- "Korean": [
42
- "ko-KR-HyunsuNeural",
43
- "ko-KR-InJoonNeural"
44
- ],
45
- "Japanese": [
46
- "ja-JP-KeitaNeural",
47
- "ja-JP-NanamiNeural"
48
- ],
49
- "French": [
50
- "fr-FR-HenriNeural",
51
- "fr-FR-DeniseNeural"
52
- ],
53
- "German": [
54
- "de-DE-ConradNeural",
55
- "de-DE-KillianNeural"
56
- ],
57
- "Spanish": [
58
- "es-ES-AlvaroNeural",
59
- "es-ES-ElviraNeural"
60
- ],
61
- "Italian": [
62
- "it-IT-DiegoNeural",
63
- "it-IT-IsabellaNeural"
64
- ],
65
- "Portuguese": [
66
- "pt-BR-AntonioNeural",
67
- "pt-BR-FranciscaNeural"
68
- ],
69
- "Dutch": [
70
- "nl-NL-MaartenNeural",
71
- "nl-NL-ColetteNeural"
72
- ],
73
- "Thai": [
74
- "th-TH-NiwatNeural",
75
- "th-TH-PremwadeeNeural"
76
- ],
77
- "Vietnamese": [
78
- "vi-VN-NamMinhNeural",
79
- "vi-VN-HoaiMyNeural"
80
- ],
81
- "Arabic": [
82
- "ar-SA-HamedNeural",
83
- "ar-SA-ZariyahNeural"
84
- ],
85
- "Hebrew": [
86
- "he-IL-AvriNeural",
87
- "he-IL-HilaNeural"
88
- ],
89
- "Indonesian": [
90
- "id-ID-ArdiNeural",
91
- "id-ID-GadisNeural"
92
- ],
93
- "Hindi": [
94
- "hi-IN-MadhurNeural",
95
- "hi-IN-SwaraNeural"
96
- ],
97
- "Russian": [
98
- "ru-RU-DmitryNeural",
99
- "ru-RU-SvetlanaNeural"
100
- ],
101
- "Chinese": [
102
- "zh-CN-YunxiNeural",
103
- "zh-CN-XiaoxiaoNeural"
104
- ],
105
- "Norwegian": [
106
- "nb-NO-FinnNeural",
107
- "nb-NO-PernilleNeural"
108
- ],
109
- "Swedish": [
110
- "sv-SE-MattiasNeural",
111
- "sv-SE-SofieNeural"
112
- ],
113
- "Finnish": [
114
- "fi-FI-HarriNeural",
115
- "fi-FI-NooraNeural"
116
- ],
117
- "Danish": [
118
- "da-DK-JeppeNeural",
119
- "da-DK-ChristelNeural"
120
- ],
121
- "Polish": [
122
- "pl-PL-MarekNeural",
123
- "pl-PL-ZofiaNeural"
124
- ],
125
- "Turkish": [
126
- "tr-TR-AhmetNeural",
127
- "tr-TR-EmelNeural"
128
- ],
129
- "Greek": [
130
- "el-GR-NestorasNeural",
131
- "el-GR-AthinaNeural"
132
- ],
133
- "Czech": [
134
- "cs-CZ-AntoninNeural",
135
- "cs-CZ-VlastaNeural"
136
- ]
137
- }
138
-
139
- # 언어별 화자 이름 설정
140
- LANGUAGE_SPEAKERS = {
141
- "Korean": ("준수", "민호"),
142
- "Japanese": ("Hiroshi", "Takeshi"),
143
- "French": ("Pierre", "Marc"),
144
- "German": ("Klaus", "Stefan"),
145
- "Spanish": ("Carlos", "Miguel"),
146
- "Italian": ("Marco", "Giuseppe"),
147
- "Portuguese": ("João", "Pedro"),
148
- "Dutch": ("Jan", "Pieter"),
149
- "Thai": ("Somchai", "Prasert"),
150
- "Vietnamese": ("Minh", "Duc"),
151
- "Arabic": ("Ahmed", "Mohammed"),
152
- "Hebrew": ("David", "Michael"),
153
- "Indonesian": ("Budi", "Andi"),
154
- "Hindi": ("Raj", "Amit"),
155
- "Russian": ("Alexei", "Dmitri"),
156
- "Chinese": ("Wei", "Jun"),
157
- "Norwegian": ("Lars", "Astrid"),
158
- "Swedish": ("Erik", "Anna"),
159
- "Finnish": ("Matti", "Liisa"),
160
- "Danish": ("Niels", "Sofie"),
161
- "Polish": ("Piotr", "Anna"),
162
- "Turkish": ("Mehmet", "Ayse"),
163
- "Greek": ("Nikos", "Maria"),
164
- "Czech": ("Pavel", "Jana"),
165
- "English": ("Alex", "Jordan") # Default
166
- }
167
-
168
- # 기본 대화 템플릿들
169
- DEFAULT_CONVERSATIONS = {
170
- "Korean": {
171
- "conversation": [
172
- {"speaker": "준수", "text": "안녕하세요, 여러분! 오늘은 정말 중요하고 흥미로운 주제를 다뤄보려고 합니다. 민호 박사님, 먼저 이 주제가 왜 지금 이렇게 주목받고 있는지 설명해주시겠어요?"},
173
- {"speaker": "민호", "text": "네, 안녕하세요. 최근 이 분야에서 획기적인 발전이 ���었습니다. 특히 작년 MIT 연구팀의 발표에 따르면, 이 기술의 효율성이 기존 대비 300% 향상되었다고 합니다. 이는 단순한 기술적 진보를 넘어서 우리 일상생활에 직접적인 영향을 미칠 수 있는 변화인데요. 실제로 구글과 마이크로소프트 같은 빅테크 기업들이 이미 수십억 달러를 투자하고 있습니다."},
174
- {"speaker": "준수", "text": "와, 300% 향상이라니 정말 놀라운데요. 그렇다면 이런 기술 발전이 일반인들에게는 구체적으로 어떤 혜택을 가져다줄 수 있을까요?"},
175
- {"speaker": "민호", "text": "가장 직접적인 혜택은 비용 절감과 접근성 향상입니다. 예를 들어, 이전에는 전문가만 사용할 수 있던 고급 기능들이 이제는 스마트폰 앱으로도 구현 가능해졌습니다. 맥킨지 보고서에 따르면, 2025년까지 이 기술로 인해 전 세계적으로 약 2조 달러의 경제적 가치가 창출될 것으로 예상됩니다."},
176
- {"speaker": "준수", "text": "2조 달러라는 엄청난 규모네요. 의료 분야에서는 어떤 변화가 예상되나요?"},
177
- {"speaker": "민호", "text": "의료 분야의 변화는 정말 혁명적일 것으로 예상됩니다. 이미 스탠포드 대학병원에서는 이 기술을 활용해 암 진단 정확도를 95%까지 높였습니다. 기존에는 숙련된 의사도 놓칠 수 있던 미세한 병변들을 AI가 감지해내는 것이죠. WHO 추산으로는 이 기술이 전 세계적으로 보급되면 연간 수백만 명의 생명을 구할 수 있을 것으로 예측하고 있습니다."},
178
- {"speaker": "준수", "text": "정말 인상적이네요. 하지만 이런 급격한 기술 발전에 대한 우려의 목소리도 있을 것 같은데요?"},
179
- {"speaker": "민호", "text": "맞습니다. 주요 우려사항은 크게 세 가지입니다. 첫째는 일자리 대체 문제로, 옥스포드 대학 연구에 따르면 향후 20년 내에 현재 직업의 47%가 자동화될 위험이 있습니다. 둘째는 프라이버시와 보안 문제입니다. 셋째는 기술 격차로 인한 불평등 심화입니다. 하지만 역사적으로 보면 새로운 기술은 항상 새로운 기회도 함께 만들어왔습니다."},
180
- {"speaker": "준수", "text": "균형잡힌 시각이 중요하겠네요. 그렇다면 우리가 이런 변화에 어떻게 대비해야 할까요?"},
181
- {"speaker": "민호", "text": "가장 중요한 것은 지속적인 학습과 적응력입니다. 세계경제포럼은 2025년까지 전 세계 근로자의 50%가 재교육이 필요할 것으로 예측했습니다. 특히 디지털 리터러시, 비판적 사고력, 창의성 같은 능력이 중요해질 것입니다. 개인적으로는 온라인 교육 플랫폼을 활용한 자기계발을 추천합니다."},
182
- {"speaker": "준수", "text": "실용적인 조언 감사합니다. 마지막으로 이 분야의 미래 전망은 어떻게 보시나요?"},
183
- {"speaker": "민호", "text": "향후 10년은 인류 역사상 가장 급격한 기술 발전을 경험하는 시기가 될 것입니다. 가트너의 하이프 사이클 분석에 따르면, 현재 우리는 이 기술의 초기 단계에 불과합니다. 2030년까지는 지금으로서는 상상하기 어려운 수준의 혁신이 일어날 것으로 예상됩니다. 중요한 것은 이런 변화를 두려워하기보다는 기회로 삼아 더 나은 미래를 만들어가는 것이라고 생각합니다."},
184
- {"speaker": "준수", "text": "정말 통찰력 있는 말씀이네요. 오늘 너무나 유익한 시간이었습니다. 청취자 여러분도 오늘 논의된 내용을 바탕으로 미래를 준비하시길 바랍니다. 민호 박사님, 귀중한 시간 내주셔서 감사합니다!"},
185
- {"speaker": "민호", "text": "감사합니다. 청취자 여러분들이 이 변화의 시대를 현명하게 헤쳐나가시길 바랍니다. 기술은 도구일 뿐이고, 그것을 어떻게 활용하는지는 우리에게 달려있다는 점을 기억해주세요."}
186
- ]
187
- },
188
- "English": {
189
- "conversation": [
190
- {"speaker": "Alex", "text": "Welcome everyone to our podcast! Today we're diving into a topic that's reshaping our world. Dr. Jordan, could you start by explaining why this subject has become so critical right now?"},
191
- {"speaker": "Jordan", "text": "Thanks, Alex. We're witnessing an unprecedented convergence of technological breakthroughs. According to a recent Nature publication, advances in this field have accelerated by 400% in just the past two years. This isn't just incremental progress - it's a fundamental shift in how we approach problem-solving. Major institutions like Harvard and Stanford are completely restructuring their research programs to focus on this area."},
192
- {"speaker": "Alex", "text": "400% acceleration is staggering! What does this mean for everyday people who might not be tech-savvy?"},
193
- {"speaker": "Jordan", "text": "The impact will be profound yet accessible. Think about how smartphones revolutionized communication - this will be similar but across every aspect of life. McKinsey's latest report projects that by 2026, these technologies will create $4.4 trillion in annual value globally. For individuals, this translates to personalized healthcare that can predict illnesses years in advance."},
194
- {"speaker": "Alex", "text": "Those applications sound transformative. Can you give us a concrete example of how this is already being implemented?"},
195
- {"speaker": "Jordan", "text": "Absolutely. Let me share a compelling case from Johns Hopkins Hospital. They've deployed an AI system that analyzes patient data in real-time, reducing diagnostic errors by 85% and cutting average diagnosis time from days to hours. In one documented case, the system identified a rare genetic disorder in a child that had been misdiagnosed for three years."},
196
- {"speaker": "Alex", "text": "That's truly life-changing technology. But I imagine there are significant challenges and risks we need to consider?"},
197
- {"speaker": "Jordan", "text": "You're absolutely right to raise this. The challenges are as significant as the opportunities. The World Economic Forum identifies three critical risks: algorithmic bias could perpetuate existing inequalities, cybersecurity threats become exponentially more dangerous, and there's the socioeconomic disruption with PwC estimating that 30% of jobs could be automated by 2030."},
198
- {"speaker": "Alex", "text": "How should individuals and organizations prepare for these changes?"},
199
- {"speaker": "Jordan", "text": "Preparation requires a multi-faceted approach. For individuals, I recommend focusing on skills that complement rather than compete with AI: critical thinking, emotional intelligence, and creative problem-solving. MIT's recent study shows that professionals who combine domain expertise with AI literacy see salary increases of 40% on average."},
200
- {"speaker": "Alex", "text": "That's practical advice. What about the ethical considerations? How do we ensure this technology benefits humanity as a whole?"},
201
- {"speaker": "Jordan", "text": "Ethics must be at the forefront of development. The EU's AI Act and similar regulations worldwide are establishing important guardrails. We need transparent AI systems where decisions can be explained and audited. Companies like IBM and Google have established AI ethics boards, but we need industry-wide standards."},
202
- {"speaker": "Alex", "text": "Looking ahead, what's your vision for how this technology will shape the next decade?"},
203
- {"speaker": "Jordan", "text": "The next decade will be transformative beyond our current imagination. By 2035, I expect we'll see autonomous systems managing entire cities, personalized medicine extending human lifespan by 20-30 years, and educational AI that makes world-class education universally accessible. However, the future isn't predetermined - it's shaped by the choices we make now."},
204
- {"speaker": "Alex", "text": "Dr. Jordan, this has been an incredibly enlightening discussion. Thank you for sharing your expertise and insights with us today."},
205
- {"speaker": "Jordan", "text": "Thank you, Alex. For listeners wanting to dive deeper, I've compiled additional resources on my website. Remember, the future isn't something that happens to us - it's something we create together. I look forward to seeing how each of you contributes to shaping this exciting new era."}
206
- ]
207
- }
208
- }
209
-
210
- # 언어별 안내 메시지
211
- LANGUAGE_INFO_MESSAGES = {
212
- "Korean": "한국어는 Edge-TTS만 지원됩니다",
213
- "Japanese": "日本語はEdge-TTSのみサポートされています",
214
- "French": "Le français n'est pris en charge que par Edge-TTS",
215
- "German": "Deutsch wird nur von Edge-TTS unterstützt",
216
- "Spanish": "El español solo es compatible con Edge-TTS",
217
- "Italian": "L'italiano è supportato solo da Edge-TTS",
218
- "Portuguese": "O português é suportado apenas pelo Edge-TTS",
219
- "Dutch": "Nederlands wordt alleen ondersteund door Edge-TTS",
220
- "Thai": "ภาษาไทยรองรับเฉพาะ Edge-TTS เท่านั้น",
221
- "Vietnamese": "Tiếng Việt chỉ được hỗ trợ bởi Edge-TTS",
222
- "Arabic": "العربية مدعومة فقط من Edge-TTS",
223
- "Hebrew": "עברית נתמכת רק על ידי Edge-TTS",
224
- "Indonesian": "Bahasa Indonesia hanya didukung oleh Edge-TTS",
225
- "Hindi": "हिंदी केवल Edge-TTS द्वारा समर्थित है",
226
- "Russian": "Русский поддерживается только Edge-TTS",
227
- "Chinese": "中文仅支持Edge-TTS",
228
- "Norwegian": "Norsk støttes kun av Edge-TTS",
229
- "Swedish": "Svenska stöds endast av Edge-TTS",
230
- "Finnish": "Suomi on tuettu vain Edge-TTS:llä",
231
- "Danish": "Dansk understøttes kun af Edge-TTS",
232
- "Polish": "Polski jest obsługiwany tylko przez Edge-TTS",
233
- "Turkish": "Türkçe yalnızca Edge-TTS tarafından desteklenir",
234
- "Greek": "Τα ελληνικά υποστηρίζονται μόνο από το Edge-TTS",
235
- "Czech": "Čeština je podporována pouze Edge-TTS"
236
- }
237
-
238
- # Gradio 예제들
239
- GRADIO_EXAMPLES = [
240
- ["https://huggingface.co/blog/openfreeai/cycle-navigator", "URL", "Local", "Edge-TTS", "English"],
241
- ["quantum computing breakthroughs", "Keyword", "Local", "Edge-TTS", "English"],
242
- ["인공지능 윤리와 규제", "Keyword", "Local", "Edge-TTS", "Korean"],
243
- ["https://huggingface.co/papers/2505.14810", "URL", "Local", "Edge-TTS", "Japanese"],
244
- ["intelligence artificielle tendances", "Keyword", "Local", "Edge-TTS", "French"],
245
- ["künstliche intelligenz entwicklung", "Keyword", "Local", "Edge-TTS", "German"],
246
- ["inteligencia artificial avances", "Keyword", "Local", "Edge-TTS", "Spanish"],
247
- ]
248
-
249
- # CSS 스타일
250
- GRADIO_CSS = """
251
- .container {max-width: 1200px; margin: auto; padding: 20px;}
252
- .header-text {text-align: center; margin-bottom: 30px;}
253
- .input-group {background: #f7f7f7; padding: 20px; border-radius: 10px; margin-bottom: 20px;}
254
- .output-group {background: #f0f0f0; padding: 20px; border-radius: 10px;}
255
- .status-box {background: #e8f4f8; padding: 15px; border-radius: 8px; margin-top: 10px;}
256
- """
257
-
258
- # Brave Search API 설정
259
- BRAVE_ENDPOINT = "https://api.search.brave.com/res/v1/web/search"