File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1616// New unified SpeechService key
1717// Free: https://azure.microsoft.com/en-us/try/cognitive-services/?api=speech-services
1818// Paid: https://go.microsoft.com/fwlink/?LinkId=872236
19- $ AccessTokenUri = "https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken " ;
20- $ apiKey = "Your api key goes here " ;
19+ $ region = getenv ('MYREGION ' );
20+ $ AccessTokenUri = "https:// " .$ region .".api.cognitive.microsoft.com/sts/v1.0/issueToken " ;
21+ $ apiKey = getenv ('MYKEY ' );
2122
2223// use key 'http' even if you send the request to https://...
2324$ options = array (
3940else {
4041 echo "Access Token: " . $ access_token . "<br> " ;
4142
42- $ ttsServiceUri = "https://westus .tts.speech.microsoft.com/cognitiveservices/v1 " ;
43+ $ ttsServiceUri = "https:// " . $ region . " .tts.speech.microsoft.com/cognitiveservices/v1 " ;
4344
4445 //$SsmlTemplate = "<speak version='1.0' xml:lang='en-us'><voice xml:lang='%s' xml:gender='%s' name='%s'>%s</voice></speak>";
4546 $ doc = new DOMDocument ();
You can’t perform that action at this time.
0 commit comments