Pregunta

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?

¿Fue útil?

Solución

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.

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top