File size: 3,402 Bytes
bf922be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import json

# Define a function to create a dataset with unique names
def create_voice_model_dataset(num_names):
    # Generate a dataset with unique names
    dataset = {"voiceModels": []}
    
    for i in range(1, num_names + 1):
        voice_model = {
            "name": f"VoiceModel_{i}",
            "description": f"Description for Voice Model {i}",
            "version": "1.0",
            "language": "en-US",
            "voiceSettings": {
                "gender": "neutral",
                "age": "adult",
                "accent": "American",
                "tone": "natural",
                "speakingRate": 1.0,
                "volumeGain": 0.0
            },
            "speechSynthesis": {
                "voiceName": f"VoiceModel_{i}_Voice",
                "sampleRateHertz": 24000,
                "pitch": 1.0,
                "range": {
                    "min": 80,
                    "max": 250
                },
                "intelligibility": 0.8,
                "emotionalTone": {
                    "happy": 0.6,
                    "sad": 0.3,
                    "angry": 0.2,
                    "neutral": 0.9
                }
            },
            "phoneticModels": [
                {
                    "name": f"VoiceModel_{i}_Phonetic_Model",
                    "description": "Basic phonetic model for standard American English pronunciation.",
                    "phonemes": [
                        "AA", "AE", "AH", "AO", "AW", "AY", "B", "CH", "D", "DH", "EH", "ER", "EY", "F", "G", "HH", "IH", "IY", "JH", "K", "L", "M", "N", "NG", "OW", "OY", "P", "R", "S", "SH", "T", "TH", "UH", "UW", "V", "W", "Y", "Z", "ZH"
                    ]
                }
            ],
            "sampleVoices": [
                {
                    "name": f"VoiceModel_{i}_Sample_Voice_1",
                    "description": "Sample voice for formal contexts.",
                    "gender": "male",
                    "age": "adult",
                    "audioFiles": [
                        f"sample_{i}_1.wav",
                        f"sample_{i}_2.wav",
                        f"sample_{i}_3.wav"
                    ]
                },
                {
                    "name": f"VoiceModel_{i}_Sample_Voice_2",
                    "description": "Sample voice for informal contexts.",
                    "gender": "female",
                    "age": "adult",
                    "audioFiles": [
                        f"sample_{i}_4.wav",
                        f"sample_{i}_5.wav",
                        f"sample_{i}_6.wav"
                    ]
                }
            ],
            "performanceMetrics": {
                "accuracy": 0.95,
                "latency": "100ms",
                "responseTime": "250ms"
            },
            "additionalFeatures": {
                "emotionRecognition": True,
                "contextualAdaptation": True,
                "multiLanguageSupport": False
            }
        }
        dataset["voiceModels"].append(voice_model)

    return dataset

# Create the dataset
num_names = 4000
dataset = create_voice_model_dataset(num_names)

# Save the dataset to a JSON file
with open('voice_model_dataset.json', 'w') as f:
    json.dump(dataset, f, indent=4)

print(f"Dataset with {num_names} voice models has been created and saved to 'voice_model_dataset.json'.")