Question

I want to transcribe (Voice to Text) using VoiceCloud API. The API documentation is lacking the examples for it.

I want to send the (mp3,wav) file using VoiceCloud API. How to send/call the API using PHP. The API provide me only the bellow single line of code to call the API:

http/:voicecloudURL/api?action=sendfile&username=youruserid&devkey=abc123&idtype=username&fileurl=http:/yourserver/file.mp3

Should I use CURL for it?

Was it helpful?

Solution

Should I use CURL for it?

That would be the best bet. Make a request to that URL and catch the response from it. Read from their API docs that they will return an XML response [consists of transactionuid]. Make use of SimpleXMLElement to grab the transactionuid as you can thus proceed further.

OTHER TIPS

You may use just fopen function if opening url is allow in php.ini. Or using curl_init and other cURL functions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top