Update Uptated-Prototype/Test-json.py
This commit is contained in:
@@ -71,8 +71,9 @@ y = json.dumps(x)
|
||||
z = json.loads(y)
|
||||
|
||||
for voice_id, info in z.items():
|
||||
lang = info["language"]["country_english"]
|
||||
print(lang)
|
||||
print((f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
||||
|
||||
# Removes duplicate languages choices from list
|
||||
|
||||
##########################
|
||||
|
||||
@@ -88,8 +89,7 @@ except FileNotFoundError:
|
||||
mylist = []
|
||||
|
||||
# Appends and formats all the languages to the list
|
||||
for voice_id, info in z.items():
|
||||
#print((f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
||||
for voice_id, info in data.items():
|
||||
mylist.append(f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
||||
|
||||
# Removes duplicate languages choices from list
|
||||
|
||||
Reference in New Issue
Block a user