File size: 6,160 Bytes
068ed60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
    This module provides the Config class.

    The Config class contains static methods to get the configuration options.
    These options include available translators, translation options, voice actors for text-to-speech, and output options.

    * Example usage:
        translators = Config.get_translators()
        translation_options = Config.get_translation_options()
        voice_actors = Config.get_voice_actors()
        output_options = Config.get_output()
"""

from dataclasses import dataclass
from typing import List, Dict


@dataclass(slots=True)
class Config:
    """
    Config class contains static methods to get the configuration options.

    Methods:
        - get_translators() -> List[Dict[str, str]] - Returns a list of available translators.
        - get_translation_options() -> List[Dict[str, str]] - Returns a list of available translation options.
        - get_voice_actors() -> List[Dict[str, str]] - Returns a list of available voice actors for text-to-speech.
        - get_output() -> List[Dict[str, str]] - Returns a list of available output options.
    """

    @staticmethod
    def get_translators() -> List[Dict[str, str]]:
        """
        Returns a list of available translators.

        Each translator is represented as a dictionary with the following keys:
        - 'name': The name of the translator.
        - 'suboptions' (optional): A list of suboptions for the translator.

        Returns:
            List[Dict[str, str]]: A list of translators.
        """
        return [
            {'name': 'Google Translate'},
            {'name': 'DeepL API'},
            {'name': 'DeepL Desktop Free'},
            {
                'name': 'ChatGPT',
                'suboptions': [
                    {'name': 'ChatGPT + Google Translate'}
                ],
            },
        ]

    @staticmethod
    def get_translation_options() -> List[Dict[str, str]]:
        """
        Returns a list of available translation options.

        Each option is represented as a dictionary with the following key:
        - 'name': The name of the option.

        Returns:
            List[Dict[str, str]]: A list of translation options.
        """
        return [
            {'name': '10'},
            {'name': '20'},
            {'name': '30'},
            {'name': '40'},
            {'name': '50'},
            {'name': '60'},
            {'name': '70'},
            {'name': '80'},
            {'name': '90'},
            {'name': '100'},
        ]

    @staticmethod
    def get_voice_actors() -> List[Dict[str, str]]:
        """
        Returns a list of available voice actors for text-to-speech.

        Each voice actor is represented as a dictionary with the following keys:
        - 'name': The name of the voice actor.
        - 'description': A dictionary containing the description of the voice actor, including:
            - 'speed': The speed of the voice actor.
            - 'volume': The volume of the voice actor.
        - 'default_options': A dictionary containing the default options for the voice actor, including:
            - 'default_voice_speed': The default speed of the voice actor.
            - 'default_voice_volume': The default volume of the voice actor.

        Returns:
            List[Dict[str, str]]: A list of voice actors.
        """
        return [
            {
                'name': 'TTS - Zosia - Harpo',
                'description': {
                    'speed': 'Szybkość głosu od 0 do ... (słowa na minutę), domyślna: 200',
                    'volume': 'Głośność głosu od 0 do 1, domyślna: 0.7',
                },
                'default_options': {
                    'default_voice_speed': '200',
                    'default_voice_volume': '0.7',
                },
            },
            {
                'name': 'TTS - Agnieszka - Ivona',
                'description': {
                    'speed': 'Szybkość głosu od -10 do 10, domyślna: 5',
                    'volume': 'Głośność głosu od 0 do 100, domyślna: 65',
                },
                'default_options': {
                    'default_voice_speed': '5',
                    'default_voice_volume': '65',
                },
            },
            {
                'name': 'TTS - Zofia - Edge',
                'description': {
                    'speed': 'Szybkość głosu (+/- ? %) od -100% do +100%, domyślna: +40%',
                    'volume': 'Głośność głosu (+/- ? %) od -100% do +100%, domyślna: +0%',
                },
                'default_options': {
                    'default_voice_speed': '+40%',
                    'default_voice_volume': '+0%',
                },
            },
            {
                'name': 'TTS - Marek - Edge',
                'description': {
                    'speed': 'Szybkość głosu (+/- ? %) od -100% do +100%, domyślna: +40%',
                    'volume': 'Głośność głosu (+/- ? %) od -100% do +100%, domyślna: +0%',
                },
                'default_options': {
                    'default_voice_speed': '+40%',
                    'default_voice_volume': '+0%',
                },
            },
            {
                'name': 'TTS - *Głos* - ElevenLans',
                'description': {
                    'speed': 'Szybkość głosu: Auto',
                    'volume': 'Głośność głou: Auto',
                },
                'default_options': {
                    'default_voice_speed': 'auto',
                    'default_voice_volume': 'auto',
                },
            },
        ]

    @staticmethod
    def get_output() -> List[Dict[str, str]]:
        """
        Returns a list of available output options.

        Each option is represented as a dictionary with the following key:
        - 'name': The name of the output option.

        Returns:
            List[Dict[str, str]]: A list of output options.
        """
        return [
            {'name': 'Oglądam w MM_AVH_Players (wynik: napisy i audio)'},
            {'name': 'Scal do mkv'},
            {'name': 'Wypal do mp4'},
        ]