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

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
springcoil committed Nov 4, 2022
1 parent c254cdd commit 454cbab
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ import apiaudio
import os
apiaudio.api_base = "https://v1.api.audio"
apiaudio.api_key = os.environ["API_KEY"]
# Make sure to have your API key in your configuration file

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

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"""


response = apiaudio.Script.create(scriptText=text, scriptName=f"testing-{name}-{preset}", projectName = "testing")
script_id = response["scriptId"]
response = apiaudio.Speech.create(scriptId=script_id, voice=name)


for preset in preset_list:
try:
response = apiaudio.Script.create(scriptText=text, scriptName=f"testing-{name}-{preset}", projectName = "testing")
script_id = response["scriptId"]
response = apiaudio.Speech.create(scriptId=script_id, voice=name)

r = apiaudio.Mastering.create(scriptId=script_id, soundTemplate="", masteringPreset = preset)
print(r)

r = apiaudio.Mastering.download(scriptId=script_id)

except Exception as e:
Expand Down

0 comments on commit 454cbab

Please sign in to comment.