The large content API allows running longer and larger jobs. The response type will be application/json, and the body of the response will be a JSON object containing more information about the error. The response will have status code 400 (for user errors) or 500 (for server errors). If there is an error during audio conversion, Short content API will contain the error in the immediate response. Narakeet API PHP exampleįor a simple example of how to access the short content (streaming) API from PHP, check out Narakeet API Java exampleįor a simple example of how to access the short content (streaming) API from Java, check out Narakeet API Dart exampleįor a simple example of how to access the short content (streaming) API from Dart, check out Error handling Narakeet API CSharp/.NET Core exampleįor a simple example of how to access the short content (streaming) API from CSharp/.NET Core, check out. Narakeet API Python exampleįor a simple example of how to access the short content (streaming) API from Python, check out. Narakeet API NodeJS/JavaScript exampleįor a simple example of how to access the short content (streaming) API from JavaScript/NodeJS, check out. See Configuring Audio Tasks for information on selecting the voice and adjusting the reading speed. You can read the audio duration of the generated file, rounded up to the nearest second, from the x-duration-seconds header. Note that on Windows, if you use CURL from the terminal, you may need to URL encode the content before sending it. The snippet below will generate a M4A file using the text “Hi there, this is your API speaking”, and save it to result.m4a.Ĭurl -d "Hi there, this is your API speaking" -H "Content-Type: text/plain" -H "x-api-key: $APIKEY" -H "accept: application/octet-stream" -output result.m4a In the request body, provide a UTF-8 encoded script text.Specify an accept header with the value application/octet-stream.Provide your API key in the x-api-key header.Set the Content Type to text/plain (see Converting Subtitle files for additional values).To request an audio file build, use one of the endpoints, and: The short content API requires just one request, and returns the audio as a binary stream. You should provide the API key as a header to all requests to the public REST endpoints, using the x-api-key header. For information on how to get a key, check out our guide on Managing API Keys. To use the API, you will need a Narakeet API key. M4A and MP3 endpoints support both short content API (streaming) and long content API (JSON polling). Note that the WAV endpoint only works for the long content (polling) API. creates compressed MPEG-4 files (best combination of file size and quality).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |