Hi, Pavan
Sorry for the delayed response, had been busy with other task, Thank you for the response, I will check out the tips provided by you and see if it works.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The document translation feature of Azure AI Translator is being tested using the cURL method from the documentation. A Hindi document with a .docx extension is being submitted with the target language set to English, but it returns some unsupported text.
Hi, Pavan
Sorry for the delayed response, had been busy with other task, Thank you for the response, I will check out the tips provided by you and see if it works.
Hi pavan,
I tried out verifying, I could see that .docx type is primarily a binary file, but after unziping it and checking the word/document.xml file it was utf-8 encoded document,
After I tried again, it is still giving me binary data.
I am attaching the screenshot of the output document and as well as the command used
file -I /Users/saurabh/Desktop/document-translation/output_utf8.docx
curl -v -i -X POST "https://translation-dev.cognitiveservices.azure.com/translator/document:translate?sourceLanguage=hi&targetLanguage=en&api-version=2024-05-01" \
-H "Ocp-Apim-Subscription-Key:xx" \
-F "document=@/Users/saurabh/Desktop/document-translation/output_utf8.docx;type=application/vnd.openxmlformats-officedocument.wordprocessingml.document" \
-o "/Users/saurabh/Desktop/document-translation/output.docx"