jvision commited on
Commit
3b1bb15
β€’
1 Parent(s): 519566e

updating prepend filenames

Browse files
prepare_model.py CHANGED
@@ -2,22 +2,6 @@ import json
2
  import os
3
  import subprocess
4
 
5
- def generate_html_output(data, repository_path):
6
- with open('speakers.md', 'a') as file:
7
- for speaker_id, speaker_info in data.items():
8
- out_path = f"{repository_path}/samples/{speaker_id}.wav"
9
- age = speaker_info['age']
10
- gender = speaker_info['gender']
11
- if gender == 'F':
12
- gender = 'female'
13
- elif gender == "M":
14
- gender = 'male'
15
- accents = speaker_info['accents']
16
- region = speaker_info['region']
17
-
18
- file.write(f"<p>VCTK_{speaker_id}: {age} year old {gender}, {accents} accent ({region})<audio controls><source src=\"{out_path}\" type=\"audio/wav\"></audio> </p>\n")
19
-
20
-
21
  # Load the data from the provided dictionary
22
  data = {
23
  "VCTK_p225": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
@@ -80,7 +64,4 @@ for speaker_idx in speaker_indices:
80
  # tts_command = f"tts --text \"{text}\" --model_path checkpoint_85000.pth --language_idx en --config_path config.json --speaker_idx \"VCTK_{speaker_id}\" --out_path {out_path}"
81
 
82
  # Execute the TTS command
83
- # os.system(tts_command)
84
-
85
- # Write the speaker information to the speakers.md file
86
- generate_html_output({speaker_id: speaker_id_json}, "https://huggingface.co/voices/VCTK_European_English_Females/resolve/main")
 
2
  import os
3
  import subprocess
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  # Load the data from the provided dictionary
6
  data = {
7
  "VCTK_p225": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
 
64
  # tts_command = f"tts --text \"{text}\" --model_path checkpoint_85000.pth --language_idx en --config_path config.json --speaker_idx \"VCTK_{speaker_id}\" --out_path {out_path}"
65
 
66
  # Execute the TTS command
67
+ # os.system(tts_command)
 
 
 
samples/{p225.wav β†’ VCTK_p225.wav} RENAMED
File without changes
samples/{p228.wav β†’ VCTK_p228.wav} RENAMED
File without changes
samples/{p229.wav β†’ VCTK_p229.wav} RENAMED
File without changes
samples/{p230.wav β†’ VCTK_p230.wav} RENAMED
File without changes
samples/{p231.wav β†’ VCTK_p231.wav} RENAMED
File without changes
samples/{p233.wav β†’ VCTK_p233.wav} RENAMED
File without changes
samples/{p236.wav β†’ VCTK_p236.wav} RENAMED
File without changes
samples/{p239.wav β†’ VCTK_p239.wav} RENAMED
File without changes
samples/{p240.wav β†’ VCTK_p240.wav} RENAMED
File without changes
samples/{p244.wav β†’ VCTK_p244.wav} RENAMED
File without changes
samples/{p250.wav β†’ VCTK_p250.wav} RENAMED
File without changes
samples/{p257.wav β†’ VCTK_p257.wav} RENAMED
File without changes
samples/{p267.wav β†’ VCTK_p267.wav} RENAMED
File without changes
samples/{p268.wav β†’ VCTK_p268.wav} RENAMED
File without changes
samples/{p269.wav β†’ VCTK_p269.wav} RENAMED
File without changes
samples/{p276.wav β†’ VCTK_p276.wav} RENAMED
File without changes
samples/{p277.wav β†’ VCTK_p277.wav} RENAMED
File without changes
samples/{p282.wav β†’ VCTK_p282.wav} RENAMED
File without changes