// Built-in reference voices for TTS models that need a speaker conditioning // payload. Native exposes a `defaultVoice` name through the capabilities // API — this module resolves that name (or any caller-supplied name) into // the structured speaker JSON the C++ side expects. import type { TTSCapabilities } from './tts' // OuteTTS legacy / V0_3 speaker shape: word-by-word codec frames. export interface OuteTTSWord { word: string duration: number codes: number[] } export interface OuteTTSSpeaker { words: OuteTTSWord[] } // NeuTTS speaker shape: pre-phonemized reference text + NeuCodec tokens. export interface NeuTTSSpeaker { ref_phones: string ref_codes: number[] } export type SpeakerPayload = | OuteTTSSpeaker | NeuTTSSpeaker | { text?: string; [k: string]: any } // OuteTTS V1.0 (text-only) or anything custom type Family = NonNullable // prettier-ignore const OUTETTS_DEFAULT: OuteTTSSpeaker = { words: [ { word: 'the', duration: 0.08, codes: [257, 740, 636, 913, 788, 1703] }, { word: 'overall', duration: 0.36, codes: [127, 201, 191, 774, 700, 532, 1056, 557, 798, 298, 1741, 747, 1662, 1617, 1702, 1527, 368, 1588, 1049, 1008, 1625, 747, 1576, 728, 1019, 1696, 1765] }, { word: 'package', duration: 0.56, codes: [935, 584, 1319, 627, 1016, 1491, 1344, 1117, 1526, 1040, 239, 1435, 951, 498, 723, 1180, 535, 789, 1649, 1637, 78, 465, 1668, 901, 595, 1675, 117, 1009, 1667, 320, 840, 79, 507, 1762, 1508, 1228, 1768, 802, 1450, 1457, 232, 639] }, { word: 'from', duration: 0.19, codes: [604, 782, 1682, 872, 1532, 1600, 1036, 1761, 647, 1554, 1371, 653, 1595, 950] }, { word: 'just', duration: 0.25, codes: [1782, 1670, 317, 786, 1748, 631, 599, 1155, 1364, 1524, 36, 1591, 889, 1535, 541, 440, 1532, 50, 870] }, { word: 'two', duration: 0.24, codes: [1681, 1510, 673, 799, 805, 1342, 330, 519, 62, 640, 1138, 565, 1552, 1497, 1552, 572, 1715, 1732] }, { word: 'people', duration: 0.39, codes: [593, 274, 136, 740, 691, 633, 1484, 1061, 1138, 1485, 344, 428, 397, 1562, 645, 917, 1035, 1449, 1669, 487, 442, 1484, 1329, 1832, 1704, 600, 761, 653, 269] }, { word: 'is', duration: 0.16, codes: [566, 583, 1755, 646, 1337, 709, 802, 1008, 485, 1583, 652, 10] }, { word: 'pretty', duration: 0.32, codes: [1818, 1747, 692, 733, 1010, 534, 406, 1697, 1053, 1521, 1355, 1274, 816, 1398, 211, 1218, 817, 1472, 1703, 686, 13, 822, 445, 1068] }, { word: 'remarkable', duration: 0.68, codes: [230, 1048, 1705, 355, 706, 1149, 1535, 1787, 1356, 1396, 835, 1583, 486, 1249, 286, 937, 1076, 1150, 614, 42, 1058, 705, 681, 798, 934, 490, 514, 1399, 572, 1446, 1703, 1346, 1040, 1426, 1304, 664, 171, 1530, 625, 64, 1708, 1830, 1030, 443, 1509, 1063, 1605, 1785, 721, 1440, 923] }, { word: 'sure', duration: 0.36, codes: [792, 1780, 923, 1640, 265, 261, 1525, 567, 1491, 1250, 1730, 362, 919, 1766, 543, 1, 333, 113, 970, 252, 1606, 133, 302, 1810, 1046, 1190, 1675] }, { word: 'i', duration: 0.08, codes: [123, 439, 1074, 705, 1799, 637] }, { word: 'have', duration: 0.16, codes: [1509, 599, 518, 1170, 552, 1029, 1267, 864, 419, 143, 1061, 0] }, { word: 'some', duration: 0.16, codes: [619, 400, 1270, 62, 1370, 1832, 917, 1661, 167, 269, 1366, 1508] }, { word: 'critiques', duration: 0.6, codes: [559, 584, 1163, 1129, 1313, 1728, 721, 1146, 1093, 577, 928, 27, 630, 1080, 1346, 1337, 320, 1382, 1175, 1682, 1556, 990, 1683, 860, 1721, 110, 786, 376, 1085, 756, 1523, 234, 1334, 1506, 1578, 659, 612, 1108, 1466, 1647, 308, 1470, 746, 556, 1061] }, { word: 'about', duration: 0.29, codes: [26, 1649, 545, 1367, 1263, 1728, 450, 859, 1434, 497, 1220, 1285, 179, 755, 1154, 779, 179, 1229, 1213, 922, 1774, 1408] }, { word: 'some', duration: 0.23, codes: [986, 28, 1649, 778, 858, 1519, 1, 18, 26, 1042, 1174, 1309, 1499, 1712, 1692, 1516, 1574] }, { word: 'of', duration: 0.07, codes: [197, 716, 1039, 1662, 64] }, { word: 'the', duration: 0.08, codes: [1811, 1568, 569, 886, 1025, 1374] }, { word: 'gameplay', duration: 0.48, codes: [1269, 1092, 933, 1362, 1762, 1700, 1675, 215, 781, 1086, 461, 838, 1022, 759, 649, 1416, 1004, 551, 909, 787, 343, 830, 1391, 1040, 1622, 1779, 1360, 1231, 1187, 1317, 76, 997, 989, 978, 737, 189] }, { word: 'aspects', duration: 0.56, codes: [1423, 797, 1316, 1222, 147, 719, 1347, 386, 1390, 1558, 154, 440, 634, 592, 1097, 1718, 712, 763, 1118, 1721, 1311, 868, 580, 362, 1435, 868, 247, 221, 886, 1145, 1274, 1284, 457, 1043, 1459, 1818, 62, 599, 1035, 62, 1649, 778] }, { word: 'but', duration: 0.2, codes: [780, 1825, 1681, 1007, 861, 710, 702, 939, 1669, 1491, 613, 1739, 823, 1469, 648] }, { word: 'its', duration: 0.09, codes: [92, 688, 1623, 962, 1670, 527, 599] }, { word: 'still', duration: 0.27, codes: [636, 10, 1217, 344, 713, 957, 823, 154, 1649, 1286, 508, 214, 1760, 1250, 456, 1352, 1368, 921, 615, 5] }, { word: 'really', duration: 0.36, codes: [55, 420, 1008, 1659, 27, 644, 1266, 617, 761, 1712, 109, 1465, 1587, 503, 1541, 619, 197, 1019, 817, 269, 377, 362, 1381, 507, 1488, 4, 1695] }, { word: 'enjoyable', duration: 0.49, codes: [678, 501, 864, 319, 288, 1472, 1341, 686, 562, 1463, 619, 1563, 471, 911, 730, 1811, 1006, 520, 861, 1274, 125, 1431, 638, 621, 153, 876, 1770, 437, 987, 1653, 1109, 898, 1285, 80, 593, 1709, 843] }, { word: 'and', duration: 0.15, codes: [1285, 987, 303, 1037, 730, 1164, 502, 120, 1737, 1655, 1318] }, { word: 'it', duration: 0.09, codes: [848, 1366, 395, 1601, 1513, 593, 1302] }, { word: 'looks', duration: 0.27, codes: [1281, 1266, 1755, 572, 248, 1751, 1257, 695, 1380, 457, 659, 585, 1315, 1105, 1776, 736, 24, 736, 654, 1027] }, { word: 'lovely', duration: 0.56, codes: [634, 596, 1766, 1556, 1306, 1285, 1481, 1721, 1123, 438, 1246, 1251, 795, 659, 1381, 1658, 217, 1772, 562, 952, 107, 1129, 1112, 467, 550, 1079, 840, 1615, 1469, 1380, 168, 917, 836, 1827, 437, 583, 67, 595, 1087, 1646, 1493, 1677] }, ], } // prettier-ignore const NEUTTS_DAVE: NeuTTSSpeaker = { ref_phones: 'soʊ aɪm laɪv ɔn ɹeɪdɪoʊ ænd aɪ seɪ wɛl maɪ dɪɹ fɹɛnd dʒeɪmz hɪɹ klɪɹli ænd ðə hoʊl ɹuːm dʒʌst fɹoʊz tɜːnz aʊt aɪd kəmpliːtli mɪsspoʊkən ænd mɛnʃənd aʊɚɹ ʌðɚ fɹɛnd', ref_codes: [18743, 2363, 35079, 1642, 29068, 34724, 31469, 18164, 22412, 33148, 50424, 37293, 30380, 382, 18061, 41324, 58765, 33470, 40812, 25518, 17804, 25500, 52843, 47075, 20039, 29694, 5855, 2810, 18092, 41788, 50556, 35709, 59069, 51532, 58205, 20749, 22148, 51219, 48495, 8953, 6780, 34780, 32415, 46075, 36670, 40853, 31688, 46492, 46424, 25153, 16793, 13025, 12975, 46803, 58919, 45679, 33466, 32939, 32789, 20677, 46097, 30793, 28753, 31326, 29105, 31901, 55524, 63637, 11852, 51834, 32230, 36282, 32220, 46155, 449, 46599, 22843, 3351, 3130, 52514, 30340, 12549, 28762, 13636, 24315, 65266, 48888, 34800, 48061, 14012, 43514, 47059, 39607, 49146, 32252, 56269, 39633, 13126, 61171, 19939, 19491, 34355, 17218, 32931, 17936, 57766, 8776, 6037, 54798, 21614, 35082, 51245, 19272, 28621, 45768, 30149, 4802, 48307, 31742, 57334, 65207, 17535, 383, 21462, 4436, 31046, 28936, 46434, 8212, 17919, 47046, 40959, 31467, 34570, 60543, 3886, 2151, 59875, 1621, 42246, 28964, 46731, 45396, 29098, 59875, 19686, 55367, 5390, 5406, 48519, 9832, 20871, 14224, 45378, 12928, 33167, 34413, 61903, 47685, 28802, 30272, 61763, 54163, 16683, 42914, 59619, 18662, 51351, 53062, 51818, 51290, 50984, 50538, 55502, 54893, 2266, 19650, 56780, 44492, 23948, 10540, 56710, 55271, 60995, 14616, 15692, 22429, 62558, 37135, 10329, 20511, 40313, 17273, 2220, 36465, 37042, 24496, 37747, 63473, 48039, 60322, 56947, 48506, 32468, 16223, 46805, 31819, 30418, 18847, 31686, 36599, 35563, 27127, 61155, 55907, 17467, 34071, 37464, 31309, 43306, 3198, 1391, 18527, 32778, 35886, 34054, 36155, 51750, 52521, 60856, 16028, 32105, 36744, 48748, 49557, 19468, 36944, 32091, 30864, 27887, 52882, 57827, 64419, 47479, 6255, 20031, 35235, 18594, 22585, 5170, 33038, 1958, 6216, 21878, 33870, 17410, 32393, 28550, 44598, 18711, 13846, 29765, 37149, 35160, 28957, 39164, 55549, 59884, 41500, 12424, 344, 57058, 55435, 36219, 50387, 16393, 53402, 47683, 15807, 36523, 60419, 58463, 34735, 46733, 13189, 29679, 26261, 53499, 50663, 53735, 54243, 29311, 51923, 56311, 64227, 24962, 220, 25089, 45351, 2331, 2166, 2614, 318, 34422, 2550, 19622, 43758, 12732, 30926, 8597, 21967, 14217, 39935, 57059, 3307, 38989, 50317, 59010, 20942, 5204, 64995, 60119, 34249, 17945, 52895, 47507, 65195, 39827, 30918, 20745, 29064, 24843, 39922, 61173, 56241, 21819, 1210, 1343, 21823, 60339, 36855, 65271, 38287, 34364, 47821, 32873, 18860, 29121, 32174, 34752, 11101, 4729, 23326, 61031, 38414, 8760, 14429, 47443, 62495, 17475, 51263, 63877, 11916, 53632, 6212, 28741, 30801, 44787, 57063, 59673, 19922, 3318], } // prettier-ignore const NEUTTS_JO: NeuTTSSpeaker = { ref_phones: 'soʊ aɪ dʒʌst tɹaɪd nuːfɑːnɪk ænd aɪm dʒɛnjuːɪnli ɪmpɹɛst ɪts suːpɚ ɹᵻspɑːnsɪv ɪt saʊndz kliːn səpoːɹts vɔɪs kloʊnɪŋ ænd ðɪ eɪdʒənt fiːtʃɚɹ ɪz fʌn tə pleɪ wɪð tuː haɪli ɹɛkəmɛnd ɪt fɔːɹ pɑːdkæsts kɑːnvɚseɪʃənz ɔːɹ iːvən dʒʌst mɛsɪŋ ɚɹaʊnd wɪð vɔɪsoʊvɚz', ref_codes: [18578, 55378, 55300, 39208, 51497, 35404, 680, 3788, 37839, 13516, 12750, 2952, 59910, 63022, 54058, 54093, 41753, 62218, 55850, 2172, 39210, 54633, 50534, 36909, 33033, 52165, 34696, 19420, 57482, 6348, 8262, 12444, 4700, 26087, 59531, 62950, 56151, 57798, 47976, 48805, 64011, 54298, 52832, 51537, 51239, 61145, 42469, 52380, 38622, 52941, 51166, 1740, 599, 6855, 4742, 684, 33563, 17212, 17194, 43759, 50346, 61510, 55677, 54774, 50326, 53597, 53372, 54045, 53356, 53597, 17574, 55505, 50656, 45496, 17181, 63170, 649, 45708, 29263, 46093, 12749, 48590, 48090, 48859, 47810, 63959, 65259, 63597, 60971, 59455, 10538, 38455, 18081, 53689, 614, 22506, 12147, 47862, 4467, 46762, 14754, 40697, 16097, 39573, 6954, 48710, 43958, 40875, 40806, 14929, 46641, 5811, 18231, 22526, 58681, 58721, 54004, 17164, 51918, 39899, 23039, 51947, 51446, 56450, 63578, 47691, 63838, 61078, 3520, 47876, 45768, 61761, 4280, 20742, 13428, 45651, 63570, 58631, 55332, 50480, 36000, 50322, 53856, 34994, 54435, 1656, 8485, 43619, 59718, 59436, 54806, 55337, 34120, 39977, 34117, 38918, 50217, 38937, 59675, 37721, 38671, 26484, 11038, 43698, 51640, 52372, 57318, 43912, 60381, 32584, 48810, 65493, 59341, 47961, 14154, 43542, 60708, 6160, 59244, 52645, 52385, 56026, 9193, 19420, 2010, 2444, 58858, 50636, 57942, 2762, 44442, 60500, 55316, 55618, 51024, 54234, 16660, 24027, 60818, 61669, 62832, 34421, 29476, 27494, 54515, 51377, 54625, 52257, 51729, 52512, 50512, 49861, 922, 21500, 4963, 21405, 30295, 9421, 14763, 30957, 14650, 15022, 27607, 60949, 60692, 64797, 57045, 56800, 31881, 64601, 56696, 56998, 8033, 1664, 18291, 18357, 52085, 52125, 19318, 34473, 50998, 39593, 50742, 35517, 33314, 36825, 22391, 55986, 54695, 54380, 57878, 49212, 58625, 53292, 58149, 53272, 54681, 19666, 54534, 55578, 36112, 55329, 35338, 6504, 28151, 56758, 52708, 24049, 62471, 59546, 57334, 1952, 30717, 15697, 5518, 13604, 6094, 43685, 59988, 60960, 23848, 55897, 61095, 61091, 56763, 51892, 58365, 35440, 60284, 34136, 42572, 49444, 21114, 10769, 59431, 60693, 26633, 56137, 56802, 60545, 65112, 60792, 52922, 43885, 21725, 7463, 6316, 22897, 18589, 18517, 19110, 34266, 36913, 26233, 22067, 22973, 39527, 7929, 52154, 50614, 50423, 54460, 57710, 50185, 57896, 53292, 55050, 53277, 53340, 50361, 39122, 50420, 37292, 1594, 444, 1286, 5618, 14951, 55714, 53607, 9781, 46263, 60281, 57465, 51441, 20712, 12572, 29308, 33580, 1769, 54, 9021, 27432, 58670, 34623, 21290, 18197, 58284, 46955, 47093, 54822, 51297, 54275, 13998, 29735, 13951, 5946, 55927, 55354, 37945, 5909, 926, 26880, 61521, 53738, 28969, 4197, 1537, 43555, 60714, 5224, 38489, 55926, 51749, 51302, 52190, 52029, 1612, 34346, 49997, 19239, 1754, 60773, 42028, 38742, 6936, 60855, 52389, 52577, 55657, 52538, 52885, 17445, 4184, 20789, 598, 19237, 44927, 65137, 47774, 33568, 47731, 56433, 35061, 52690, 60712, 56376, 5385, 53363, 2865, 46945, 29334, 59697, 47171, 48816, 65471, 61154, 19682, 39377, 50822, 53502, 50730, 50306, 49761, 49404, 51719, 49374, 54667, 1173, 3478, 55510, 57358, 41037, 4111, 25678, 45607, 15949, 46030, 38876, 903, 10060, 1590, 23385, 40466, 34598, 41786, 54045, 64415, 65301, 48862, 12808, 13017, 12808, 26521, 54676, 55429, 41641, 5912, 36567, 22355, 23447, 5834, 16917, 637, 19227, 50151, 21065, 22185, 58662, 51482, 52586, 23940, 2541, 11080, 61179, 56548, 36081, 62853, 46238, 41503, 56921, 16790, 52556, 61851, 35229, 16535, 33180, 8584, 21978, 54477, 51416, 58502, 53624, 50022, 60152, 33109, 248, 32838, 20956, 41290, 42456, 4737, 43029, 59690, 21524, 54860, 56464, 59397, 50566, 33367, 26765, 20939, 2716, 31688, 61083, 57222, 47049, 2824, 63766, 56858, 36448, 52752, 54528, 34688, 45652, 1916, 37493, 26555, 34613, 62763, 54574, 1129, 50298, 62119, 34404, 58025, 46867, 60370, 60962, 56378, 64025, 46537, 47268, 39677, 36424, 57037, 1284, 8794, 57636, 55377, 62826, 45885, 42799, 51065, 21367, 21408, 26462, 56982, 55959, 58201, 62317, 45595, 31458, 27553, 54890, 33583, 8994, 29513, 17189, 18182, 64818, 54325, 51811, 52679, 21139, 39879, 57741, 33064, 37276, 793, 840, 25107, 43300, 51492, 49681, 49944, 18429, 33443, 51658, 62725, 21740, 19857, 48366, 30849, 12488, 37123, 5513, 16903, 20124, 25333, 31477, 35508, 47949, 25396, 24402, 64865, 60582, 60774, 60519, 65274, 63348, 30584, 39933, 22804, 43478, 25168, 46691, 64811, 52521, 19808, 55577, 56642, 26209, 31982, 47473, 2236, 48116, 56758, 56486, 56807, 55680, 42202, 44096, 62677, 59922, 59511, 53051, 52602, 52008, 50657, 18775, 50539, 34984], } // prettier-ignore const NEUTTS_GRETA: NeuTTSSpeaker = { ref_phones: 'iːz wɜːd aɪn ʌntɜːsətʃʌŋ zɜːɹ ɔːfklɪɹʌŋ dɛs ʌnfɔːlz aɪndʒɪleɪtɛt', ref_codes: [18534, 22562, 27051, 22551, 1127, 18674, 13702, 8520, 5894, 10503, 25625, 26644, 9236, 38920, 51270, 51366, 55779, 48890, 2928, 11771, 12736, 3990, 35011, 17498, 4752, 14356, 6686, 22724, 24793, 5832, 854, 12356, 8731, 17, 16151, 6807, 6986, 11949, 11765, 43253, 39832, 15691, 7090, 3042, 12427, 16974, 13222, 6786, 32548, 20291, 15874, 27683, 52751, 48027, 4017, 6891, 11760, 6906, 39030, 58536, 47465, 59897, 53141, 1268, 18978, 6309, 40822, 43514, 36533, 19898, 6055, 11602, 54556, 38957, 5148, 34133, 14001, 7832, 10861, 47336, 27112, 17769, 48888, 889, 10996, 2976, 6491, 4107, 47117, 54956, 52725, 11469, 10637, 53294, 53867, 15009, 17106, 8980, 12369, 261, 3722, 26462, 19706, 31527, 7346, 19239, 15733, 19427, 48595, 21265, 23446, 7958, 15375, 23849, 6477, 58776, 56566, 52193, 31733, 19363, 15078, 19319, 12258, 14490, 40038, 55318, 43037, 58436, 40597, 549, 14929, 9253, 661, 2854, 30786, 22568, 6461, 51552, 56772, 26972, 46489, 29004, 33290, 17212, 31494, 2741, 23442, 16053, 11235, 21891, 25339, 17192, 29576, 29974, 30103, 31285, 30354, 30489, 43400, 34330, 22868, 46613, 28964, 45605, 29469, 5666, 40114, 18677, 9278, 5166, 31648, 47048, 10022, 40115, 34913, 2230, 19634, 4668, 4378, 30148, 41246, 58780, 59662, 60877, 59720, 62700, 61253, 59628, 50257, 39161, 40018, 23686, 37921, 21862, 21930, 2133, 1114, 2299, 3571], } // prettier-ignore const NEUTTS_JULIETTE: NeuTTSSpeaker = { ref_phones: 'dænz lɛs zoʊnz ɹʊɹɹeɪlz uː də nɑːmbɹuːsᵻz kəmjuːnəteɪz ɛnɑːnt pæs ɐksɪᵻz æ ɛleɪlɪktɹɪsɪteɪ ɛleɪnɚdʒi səlɛɹ pjuːt fɛɹ juːn ɪnoːɹm dɪfeɪɹəns', ref_codes: [39078, 11747, 10273, 27874, 15490, 26725, 27046, 10322, 24791, 11446, 19683, 45030, 45027, 56038, 55623, 23334, 5946, 7800, 9899, 14748, 7014, 7123, 13666, 27318, 27043, 13682, 14147, 39722, 44574, 9511, 41734, 60232, 60200, 60968, 46888, 64150, 32291, 9943, 2903, 34457, 18992, 7533, 27674, 56686, 57005, 6962, 11154, 34659, 18083, 18272, 25866, 43295, 52889, 30314, 28069, 18014, 48793, 34415, 47765, 33642, 42624, 38745, 45795, 20130, 18131, 30594, 42569, 54624, 55698, 39008, 2227, 60150, 45050, 39265, 39587, 56803, 57775, 34401, 18882, 60192, 33234, 36519, 51951, 19047, 2791, 19319, 23459, 13718, 14645, 15609, 15201, 29937, 6913, 27366, 20395, 8183, 55683, 27064, 44657, 56694, 44982, 26809, 38500, 2242, 1392, 25234, 58635, 25705, 10505, 3448, 6170, 21005, 56339, 52406, 6286, 40646, 2416, 11665, 64914, 40439, 20435, 18567, 18279, 35299, 49015, 31203, 18339, 35521, 47890, 18819, 26390, 57963, 59493, 54752, 2546, 59400, 37909, 34678, 1712, 1330, 5473, 45174, 47799, 23779, 19363, 34435, 19242, 48500, 14897, 1248, 56295, 51947, 40112, 27872, 27941, 11477, 7394, 59783, 19357, 57965, 56724, 16747, 32912, 20816, 10850, 44567, 44054, 20755, 55062, 58900, 35948, 57930, 5481, 57671, 59637, 51393, 12428, 45130, 58462, 8197, 23845, 38912, 19488, 36881, 63074, 13745, 17829, 17233, 47780, 17001, 57957, 35685, 58086, 41908, 37823, 64359, 55651, 42913, 43002, 5045, 63039, 50418, 40129, 53644, 36322, 63634, 45061, 46087, 57482, 50775, 29429, 22390, 62763, 59422, 43108, 25700, 42040, 50278, 35510, 31603, 60203, 56675, 55458, 7585, 7335, 60434, 38938, 49446, 63353, 45728, 61998, 26468, 34430, 46009, 58547, 55410, 25826, 57831, 54444, 57751, 58460, 62533, 53548, 59975, 57432, 57434, 58732, 53258, 54364, 57414, 58536, 58537, 54434, 21882, 51415, 54245, 7025, 25271, 32663, 14835, 30610, 29556, 30565, 45596, 47909, 32344, 14934, 14025, 58127, 38971, 25643, 45686, 14963, 42810, 58894, 13369, 6165, 7545, 53276, 57686, 22354, 19394, 33604, 34724, 36834, 37537, 51028, 34468, 1681, 18008, 21322, 23049, 63502, 62796, 65129, 60633, 19681, 61575, 52170, 34672, 38865, 23105, 62474, 57369, 55333, 54274, 50854, 18276, 49748, 38664, 37960, 19066, 39066, 60276, 35270, 56240, 33207, 35175, 44779, 57254, 20211, 43682, 50549, 17969, 57893, 50801, 17845, 43617, 36263, 36583, 28075, 60326, 19687, 35478, 28075, 40938, 35491, 33042, 34305, 39048, 42617, 44116, 22133, 18593, 17780, 18612, 7997, 64954, 39546, 2424, 60338, 28123, 19431, 48582, 33601, 46743, 42794, 60135, 60883, 60851, 65075, 55099, 64298, 43067, 24681, 28862, 45069, 58392, 53274, 57959, 1904, 38822, 62309, 38473, 43871, 64555, 56821, 63413, 63992, 48040, 30549, 47600, 31654, 65257, 59675, 62746, 39257, 2325, 22868, 38405, 23589, 3353, 18457, 58374, 47489, 31282, 47253, 57195, 52385, 60566, 51430, 55529, 56647, 50372, 50265], } // Voice tables are keyed by [family][language][name]. Different language // variants of the same model family can ship different reference clips // (small NeuTTS-Nano-German uses Greta, NeuTTS-Nano-French uses Juliette, // the en-us models default to Dave/Jo) so the tables are split by // language to keep "default" pointing at something valid for each. const VOICE_TABLES: Partial< Record>> > = { outetts: { 'en-us': { default: OUTETTS_DEFAULT }, }, neutts: { 'en-us': { default: NEUTTS_JO, dave: NEUTTS_DAVE, jo: NEUTTS_JO, }, de: { default: NEUTTS_GRETA, greta: NEUTTS_GRETA, }, 'fr-fr': { default: NEUTTS_JULIETTE, juliette: NEUTTS_JULIETTE, }, }, } const DEFAULT_LANGUAGE = 'en-us' export function lookupVoice( family: string, name: string, language: string = DEFAULT_LANGUAGE, ): SpeakerPayload | null { return VOICE_TABLES[family as Family]?.[language]?.[name] ?? null } export function listVoices( family: string, language: string = DEFAULT_LANGUAGE, ): string[] { return Object.keys(VOICE_TABLES[family as Family]?.[language] ?? {}) } export function listLanguages(family: string): string[] { return Object.keys(VOICE_TABLES[family as Family] ?? {}) }