aflorithmic / apiaudio-python Goto Github PK
View Code? Open in Web Editor NEWapi.audio Python SDK
Home Page: https://www.api.audio
License: MIT License
api.audio Python SDK
Home Page: https://www.api.audio
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.circleci/config.yml
aws-cli 3.1
slack 4.9.3
returntocorp/semgrep-agent v1
cimg/python 3.8
Hello,
I copy pasted the code from this page: https://docs.api.audio/recipes/hello-world-create-your-first-audio-track
For future reference it displays this code:
#Check that you are using python 3.8 or further
#pip install -U apiaudio
import apiaudio
# Make sure to import your API key
apiaudio.api_key ="xxxxxx"
# Let's create a script and have the text as Hello World!
script = apiaudio.Script().create(scriptText="""
<<soundSegment::intro>>
<<sectionName::intro>>
Hello world. Welcome to API dot audio.
<<soundSegment::main>>
<<sectionName::main>>
Create audio in a few easy steps. Use sound templates and effects. <break time = '1s'/>
<<soundSegment::outro>>
<<sectionName::outro>>
We're excited to see what you build!
""", scriptName="helloworld", moduleName="hello", projectName="hello")
print(script)
# Create text to speech
# Choose a voice! https://library.api.audio/speakers
response = apiaudio.Speech().create(scriptId=script.get("scriptId"), voice="Joanna")
print(response)
template="parisianmorning"
# Now lets add audio to the speech file and master it with high quality
response = apiaudio.Mastering().create(
scriptId=script.get("scriptId"),
soundTemplate=template
)
print(response)
# retrieve mastered file and download to your local folder
file = apiaudio.Mastering().download(scriptId=script.get("scriptId"), destination=".")
print(file)
The last line doesn't work, I'm getting:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-c977554b0c8f> in <module>
----> 1 file = apiaudio.Mastering().download(scriptId=script.get("scriptId"), destination=".")
~/Code/dev-env/lib/python3.9/site-packages/apiaudio/helper_classes.py in download(cls, scriptId, section, parameters, public, vast, destination)
55
56 if "url" in audio_files.keys():
---> 57 local_filename = cls._download_request(
58 url=audio_files.get("url"), destination=destination
59 )
~/Code/dev-env/lib/python3.9/site-packages/apiaudio/api_request.py in _download_request(cls, url, destination)
59 @classmethod
60 def _download_request(cls, url, destination):
---> 61 local_filename = f"{destination}/{url.split('/')[-1].split('?')[0]}"
62 local_filename = local_filename.replace("%243ct10n", "section")
63
AttributeError: 'bool' object has no attribute 'split'
My version of apiaudio is 0.8.5
While mastering speech with scriptId, getting an error.
File "C:\Python\lib\site-packages\apiaudio\api_request.py", line 147, in _expanded_raise_for_status raise HTTPError( requests.exceptions.HTTPError: {'message': 'Internal server error'} Error Message from API: 502 Server Error: Bad Gateway for url: https://v1.api.audio/mastering
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.