mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 15:19:59 +08:00
23 lines
542 B
Python
23 lines
542 B
Python
import os
|
|
|
|
|
|
def get_voices_yaml(directory):
|
|
try:
|
|
with os.scandir(directory) as entries:
|
|
for entry in entries:
|
|
if entry.is_file():
|
|
print(entry.path)
|
|
except FileNotFoundError:
|
|
print("Directory not found")
|
|
except PermissionError:
|
|
print("Permission denied")
|
|
except Exception as e:
|
|
print(f"An error occurred: {e}")
|
|
|
|
|
|
# Specify the path to the directory
|
|
directory_path = 'GPT_SoVITS/configs/voices'
|
|
|
|
# Call the function
|
|
get_voices_yaml(directory_path)
|