Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 454cbab

Browse files
committed
Small fix
1 parent c254cdd commit 454cbab

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,22 @@ import apiaudio
1616
import os
1717
apiaudio.api_base = "https://v1.api.audio"
1818
apiaudio.api_key = os.environ["API_KEY"]
19-
# Make sure to have your API key in your configuration file
2019

20+
# generate female voice with and without desser for A/B test
2121
preset_list = ["default", "deesserfemale"] # try male voice ex. -> ["default", "deessermale"]
2222
name = "vicki" # try male voice ex. -> ["brandon"]
2323

2424
text = f"""Hi I am {name} and this is the result of applying de-essing to my voice, she sells seashells on the seashore. Sand, sent, sink, sonar, sun"""
2525

26-
27-
response = apiaudio.Script.create(scriptText=text, scriptName=f"testing-{name}-{preset}", projectName = "testing")
28-
script_id = response["scriptId"]
29-
response = apiaudio.Speech.create(scriptId=script_id, voice=name)
30-
31-
3226
for preset in preset_list:
3327
try:
28+
response = apiaudio.Script.create(scriptText=text, scriptName=f"testing-{name}-{preset}", projectName = "testing")
29+
script_id = response["scriptId"]
30+
response = apiaudio.Speech.create(scriptId=script_id, voice=name)
31+
3432
r = apiaudio.Mastering.create(scriptId=script_id, soundTemplate="", masteringPreset = preset)
3533
print(r)
36-
34+
3735
r = apiaudio.Mastering.download(scriptId=script_id)
3836

3937
except Exception as e:

0 commit comments

Comments
 (0)