@Gianluca Perrone Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
I see that you are experiencing a timeout issue when making a post request to the Azure Speech Services from a VM in Azure. The customer has already tried to open every possible port and connection to the machine, but the issue persists
Looking at the error message its pretty clear that this is related to the network connectivity. Please follow the below action plan to isolate this issue.
Plan 1:
Please run the below telnet command from the Azure VM.
telnet eastus.tts.speech.microsoft.com 443
If the ports are open and connectivity is fine, you should see a blank window like below:
Plan 2:
You can download the port query UI tool and extract its contents. Then launch the portqueryui.exe fill the required details as shown below and click on Query button. You should see an output saying Listening if ports are open.
Plan 3:
Please check if you get http status code 200 from the postman.
Plan 4:***
RDP to your Azure VM and open the Azure Speech Studio and then click on Audio Content Creation to leverage the text to speech feature and see if that works fine.
Select Text File:
Then select the voice, quality and click on play button and then you can export you audio as shown below:
Plan 5:
Please open the Networking blade of your Speech service: **
**
You can try adding your existing Vnet and check if that helps:
You can also try to Enable a service endpoint for Azure AI services within the virtual network. The service endpoint routes traffic from the virtual network through an optimal path to the Azure AI services service. For more information, see Virtual Network service endpoints.
More Info about Azure AI Service Networking option is explained here.
If none of the above action plan helps. Please let me know. I would be happy to assist you further.
Awaiting your reply.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.