playht / text-to-speech-api Goto Github PK
View Code? Open in Web Editor NEWPlay.ht's Text to Speech API
Home Page: https://play.ht
Play.ht's Text to Speech API
Home Page: https://play.ht
Can you provide some details on narration style formatting required? Using a premium account and using a voice that has narration styles (ex Aria with News (formal), News (casual), Customer Service, Chat, Cheerful, Empathetic) adding the line item "narrationStyle": "News (formal)" returns "Unsupported narration style"
How do you use these with the API?
After the article (text) is converted to audio, can I get word level timestamp of the speech as part of the metadata? This feature is extremely important for our use case. Thank you
How to request WAV for preview?
MP3 at 48 kbps is extremely low quality for a good voice.
The OPUS codec is much better even at 32 kbps, if WAV is too big for storage.
But having quality voices and this crappy MP3 preview is very bad...
The output shows the word count
{
"status": "transcriping",
"transcriptionId": "<hidden>",
"contentLength": 1,
"wordCount": 1
}
But it would be great if it could show: wordsRemaining
Hello
I was able to create a request to create a file but it only shows up in Play.at account. I need to download it via Python script. My files are very small. Usually one senctance 3-7 words.
Seems turbo gives worst results than dashboard, why?
Could you give a python example as I would like to know how to do it. I'm not fully understanding the requests.
{
"voice": "Jessica",
"ssml": [
"<audio src="https://dm0qx8t0i9gc9.cloudfront.net/previews/audio/BsTwCwBHBjzwub4i4/audioblocks-hissing-whoosh-to-deep-hit-3-film-trailer-cinematic-film-trailer-cinematic_rWUDBOmtP8_NWM.mp3">Rep. Nancy Mace, who voted against impeaching Trump, says there's 'a lot of pressure' on Republicans to impeach Biden: 'I think that is something that some folks are considering'<break time="500ms"/>
Rep. Nancy Mace says there's pressure on Republicans to vote to impeach President Biden if the party wins the midterms and gains control of the House.
Mace was on NBC's Meet The Press on Sunday, speaking with host Chuck Todd who asked: "Do you expect an impeachment vote against President Biden if Republicans take over the House?"
"this is the postman request i am sending, i want to play an audio first then want AI to read out the paragraph, right now it's not doing that. it returns
"errorMessage": "Something went wrong with audio conversion! (Code: ERR_PROCESSING)",
am i doing something wrong? does playht allows this? what i am trying to achieve?
Hi, it seems the key explaining the error in the convert endpoint response is now called "message" instead of "error":
{
"status": "transcriping" | "error",
"transcriptionId": string,
"error": string // Optional
}
should be:
{
"status": "transcriping" | "error",
"transcriptionId": string,
"message": string // Optional
}
I am trying to invoke the API with CURL:
curl -H "X-User-ID:my_API_user" -H "Authorization:my_API_secret" -X POST https://play.ht/api/v1/convert -d '{"voice":"Emilia","content":"Something","title":"Something"}'
System responds with this information:
{"error":"Voice is required."}
Could you provide some working examples?
Should return an audio file.
I am getting a server error when I try to get the request response (request.GetResponseAsync)
WebRequest request = WebRequest.Create("https://play.ht/api/v1/convert");
request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Set("Authorization", "authkey");
request.Headers.Set("X-User-ID", "userid");
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
string json = "{\"voice\":\"es-ES-Standard-A\"," +
"\"content\":\"What is the weather today\"}";
streamWriter.Write(json);
}
WebResponse response = await request.GetResponseAsync();
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
using (var dataStream = new StreamReader(response.GetResponseStream()))
{
string responseFromServer = dataStream.ReadToEnd();
Console.WriteLine("Server Response: " + responseFromServer);
}
response.Close();
Hello!
When sending a POST request from a python script using the Requests module, the response is a code 500.
Request is:
requests.post('https://play.ht/api/v1/./convert',headers={'Authorization':user_key,'X-User-ID':user_id},data=dict_args)
Where data consists of
dict_args = {"voice":chosen_voice,"content":body,"title":name}
being all of the keys variables of type string ("content" was also tested with a list of strings containing 1 string)
user_key, user_id as type string.
The lack of examples in the documentation is leaving me out of ideas.
If I pass in pronunciations via the API it doesn't actually render with the expected target pronunciation unless I first go into a a voice project in the UI and add it to the pronunciation library.
In my opinion this kind of defeats the purpose of the API and should be fixed.
Hi, first of all I really like your API and service. From what I can see it is stable and fast. For my use-case I am using it to automatically generate voice-overs for e-learning content and it works great. I would like to make 2 feature requests regarding this usecase:
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.