Spaces:
Running
on
Zero
Running
on
Zero
File size: 13,546 Bytes
01e655b |
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
from modules.utils.CsvMgr import BaseManager
# speakers_mgr = BaseManager("./data/speakers.csv")
styles_mgr = BaseManager("./data/styles.csv")
if __name__ == "__main__":
# builtin style
styles = {
"advertisement_upbeat": {
"speed": 9,
"oral": 7,
"laugh": 2,
"break": 1,
"prefix": "兴奋的语气推广产品。",
},
"affectionate": {
"speed": 6,
"oral": 8,
"laugh": 1,
"break": 2,
"prefix": "温暖亲切的语气。",
},
"angry": {
"speed": 7,
"oral": 5,
"break": 3,
"prefix": "生气厌恶的语气。",
},
"assistant": {
"speed": 5,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "热情轻松的语气。",
},
"calm": {
"speed": 0,
"oral": 4,
"break": 4,
"prefix": "沉着冷静的语气。",
},
"chat": {
"speed": 6,
"oral": 9,
"laugh": 1,
"break": 2,
"prefix": "轻松随意的语气。",
},
"cheerful": {
"speed": 7,
"oral": 8,
"laugh": 2,
"break": 2,
"prefix": "积极愉快的语气。",
},
"customerservice": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 5,
"prefix": "友好热情的语气。",
},
"depressed": {
"speed": 2,
"oral": 3,
"break": 5,
"prefix": "忧郁沮丧的语气。",
},
"disgruntled": {
"speed": 4,
"oral": 5,
"break": 4,
"prefix": "轻蔑抱怨的语气。",
},
"documentary-narration": {
"speed": 4,
"oral": 4,
"break": 3,
"prefix": "轻松且信息丰富的语气。",
},
"embarrassed": {
"speed": 3,
"oral": 3,
"break": 5,
"prefix": "不确定犹豫的语气。",
},
"empathetic": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 3,
"prefix": "关心理解的语气。",
},
"envious": {
"speed": 5,
"oral": 5,
"laugh": 1,
"break": 2,
"prefix": "钦佩的语气。",
},
"excited": {
"speed": 8,
"oral": 7,
"laugh": 2,
"break": 1,
"prefix": "乐观充满希望的语气。",
},
"fearful": {
"speed": 9,
"oral": 6,
"break": 2,
"prefix": "恐惧紧张的语气。",
},
"friendly": {
"speed": 6,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "愉快温暖的语气。",
},
"gentle": {
"speed": 4,
"oral": 5,
"laugh": 1,
"break": 3,
"prefix": "温和礼貌的语气。",
},
"hopeful": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 4,
"prefix": "温暖渴望的语气。",
},
"lyrical": {
"speed": 3,
"oral": 4,
"break": 4,
"prefix": "优美感伤的语气。",
},
"narration-professional": {
"speed": 5,
"oral": 3,
"break": 3,
"prefix": "专业客观的语气。",
},
"narration-relaxed": {
"speed": 2,
"oral": 4,
"break": 3,
"prefix": "舒缓悦耳的语气。",
},
"newscast": {
"speed": 6,
"oral": 4,
"break": 2,
"prefix": "正式专业的语气。",
},
"newscast-casual": {
"speed": 5,
"oral": 5,
"break": 2,
"prefix": "随意的新闻语气。",
},
"newscast-formal": {
"speed": 6,
"oral": 3,
"break": 2,
"prefix": "正式权威的语气。",
},
"poetry-reading": {
"speed": 4,
"oral": 5,
"break": 3,
"prefix": "带情感和节奏的语气。",
},
"sad": {
"speed": 0,
"oral": 3,
"break": 5,
"prefix": "悲伤的语气。",
},
"serious": {
"speed": 5,
"oral": 3,
"break": 4,
"prefix": "严肃命令的语气。",
},
"shouting": {
"speed": 7,
"oral": 6,
"break": 1,
"prefix": "努力让别人听清楚的语气。",
},
"sports_commentary": {
"speed": 8,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "轻松感兴趣的体育播报语气。",
},
"sports_commentary_excited": {
"speed": 9,
"oral": 8,
"laugh": 2,
"break": 1,
"prefix": "快速充满活力的体育播报语气。",
},
"whispering": {
"speed": 2,
"oral": 3,
"break": 4,
"prefix": "柔和的语气。",
},
"terrified": {
"speed": 9,
"oral": 7,
"break": 1,
"prefix": "害怕的语气。",
},
"unfriendly": {
"speed": 4,
"oral": 2,
"break": 3,
"prefix": "冷淡无情的语气。",
},
}
styles_en = {
"advertisement_upbeat": {
"speed": 9,
"oral": 7,
"laugh": 2,
"break": 1,
"prefix": "Promote products or services with an excited and energetic tone.",
},
"affectionate": {
"speed": 6,
"oral": 8,
"laugh": 1,
"break": 2,
"prefix": "Express a warm and affectionate tone with a higher pitch and volume. The speaker is in a state of capturing the listener's attention and is often likeable.",
},
"angry": {
"speed": 7,
"oral": 5,
"break": 3,
"prefix": "Express an angry and disgusted tone.",
},
"assistant": {
"speed": 5,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "Digital assistant uses an enthusiastic and relaxed tone.",
},
"calm": {
"speed": 0,
"oral": 4,
"break": 4,
"prefix": "Speak with a calm and composed attitude. The tone, pitch, and rhythm are much more consistent compared to other speech types.",
},
"chat": {
"speed": 6,
"oral": 9,
"laugh": 1,
"break": 2,
"prefix": "Express a relaxed and casual tone.",
},
"cheerful": {
"speed": 7,
"oral": 8,
"laugh": 2,
"break": 2,
"prefix": "Express a positive and cheerful tone.",
},
"customerservice": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 5,
"prefix": "Provide support to customers with a friendly and enthusiastic tone.",
},
"depressed": {
"speed": 2,
"oral": 3,
"break": 5,
"prefix": "Express a depressed and downcast tone with lower pitch and volume.",
},
"disgruntled": {
"speed": 4,
"oral": 5,
"break": 4,
"prefix": "Express a tone of contempt and complaint. This emotional voice exhibits displeasure and disdain.",
},
"documentary-narration": {
"speed": 4,
"oral": 4,
"break": 3,
"prefix": "Narrate documentaries in a relaxed, interested, and informative style, suitable for documentary voiceovers, expert commentary, and similar content.",
},
"embarrassed": {
"speed": 3,
"oral": 3,
"break": 5,
"prefix": "Express an uncertain, hesitant tone when the speaker feels uncomfortable.",
},
"empathetic": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 3,
"prefix": "Express care and understanding.",
},
"envious": {
"speed": 5,
"oral": 5,
"laugh": 1,
"break": 2,
"prefix": "Express an admiring tone when you desire something others have.",
},
"excited": {
"speed": 8,
"oral": 7,
"laugh": 2,
"break": 1,
"prefix": "Express an optimistic and hopeful tone. It seems something wonderful has happened, and the speaker is pleased.",
},
"fearful": {
"speed": 9,
"oral": 6,
"break": 2,
"prefix": "Express a fearful and anxious tone with a higher pitch, higher volume, and faster speech rate. The speaker is in a state of tension and unease.",
},
"friendly": {
"speed": 6,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "Express a pleasant, delightful, and warm tone. It sounds sincere and full of concern.",
},
"gentle": {
"speed": 4,
"oral": 5,
"laugh": 1,
"break": 3,
"prefix": "Express a gentle, polite, and pleasant tone with a lower pitch and volume.",
},
"hopeful": {
"speed": 5,
"oral": 6,
"laugh": 1,
"break": 4,
"prefix": "Express a warm and desirous tone. It sounds like something good is going to happen to the speaker.",
},
"lyrical": {
"speed": 3,
"oral": 4,
"break": 4,
"prefix": "Express emotions in a beautiful and sentimental way.",
},
"narration-professional": {
"speed": 5,
"oral": 3,
"break": 3,
"prefix": "Read content in a professional and objective tone.",
},
"narration-relaxed": {
"speed": 2,
"oral": 4,
"break": 3,
"prefix": "Express a soothing and pleasant tone when reading content.",
},
"newscast": {
"speed": 6,
"oral": 4,
"break": 2,
"prefix": "Narrate news in a formal and professional tone.",
},
"newscast-casual": {
"speed": 5,
"oral": 5,
"break": 2,
"prefix": "Deliver general news in a generic and casual tone.",
},
"newscast-formal": {
"speed": 6,
"oral": 3,
"break": 2,
"prefix": "Deliver news in a formal, confident, and authoritative tone.",
},
"poetry-reading": {
"speed": 4,
"oral": 5,
"break": 3,
"prefix": "Express an emotional and rhythmic tone when reading poetry.",
},
"sad": {"speed": 0, "oral": 3, "break": 5, "prefix": "Express a sad tone."},
"serious": {
"speed": 5,
"oral": 3,
"break": 4,
"prefix": "Express a serious and commanding tone. The speaker's voice is usually stiff, and the pace is not as relaxed.",
},
"shouting": {
"speed": 7,
"oral": 6,
"break": 1,
"prefix": "Express a tone that sounds like the voice is far away or in another place, trying hard to be heard clearly.",
},
"sports_commentary": {
"speed": 8,
"oral": 7,
"laugh": 1,
"break": 2,
"prefix": "Express a relaxed yet interested tone, used for sports commentary.",
},
"sports_commentary_excited": {
"speed": 9,
"oral": 8,
"laugh": 2,
"break": 1,
"prefix": "Commentate on exciting moments in sports with a fast and energetic tone.",
},
"whispering": {
"speed": 2,
"oral": 3,
"break": 4,
"prefix": "Express a soft tone, trying to make a quiet and gentle sound.",
},
"terrified": {
"speed": 9,
"oral": 7,
"break": 1,
"prefix": "Express a terrified tone, with fast speech and trembling voice. It sounds like the speaker is in an unstable, frantic state.",
},
"unfriendly": {
"speed": 4,
"oral": 2,
"break": 3,
"prefix": "Express a cold and unfeeling tone.",
},
}
id = 0
for k, v in styles.items():
v.pop("prefix")
styles_mgr.add_item(id, k, f"builtin style {k}", v)
id += 1
# for k, v in styles_en.items():
# styles_mgr.add_item(id, f"en_{k}", f"builtin style {k}", v)
# id += 1
|