CORS policy access for google cloud voices
In my application, whenever I call sayText with one of the traditional voices all works fine. Now, I have a platinum plan and I linked my google cloud api key. All voices work when I test them inside SitePal. However, when I try to call those voices from sayText in localhost:5000, I get the following chain of errors:
sitepal:1 Access to XMLHttpRequest at 'http://cache-a.oddcast.com/tts/genC.php?EID=91&LID=2&VID=11&TXT=Hello%20Alice%2C%20it%27s%20great%20to%20have%20you%20here.&EXT=mp3&FNAME=&ACC=8688641&SceneID=2756818&HTTP_ERR=' from origin 'http://localhost:5000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VHSSEngine_R.js:24 GET http://cache-a.oddcast.com/tts/genC.php?EID=91&LID=2&VID=11&TXT=Hello%20Alice%2C%20it%27s%20great%20to%20have%20you%20here.&EXT=mp3&FNAME=&ACC=8688641&SceneID=2756818&HTTP_ERR= net::ERR_FAILED 503 (The server is temporarily unable to fulfill the request. OK to re-resubmit.)
load @ VHSSEngine_R.js:24
cf @ VHSSEngine_R.js:28
Aa @ VHSSEngine_R.js:28
FU @ VHSSEngine_R.js:2
cN @ VHSSEngine_R.js:2
sayUrlWithID3 @ VHSSEngine_R.js:7
sayUrl @ VHSSEngine_R.js:7
_playAudio @ sitepalPlayer_v1.js:1
playAudio @ sitepalPlayer_v1.js:1
(anonymous) @ sitepalPlayer_v1.js:1
setInterval
vhsshtml5_callAudiotoPlay @ sitepalPlayer_v1.js:1
handleProcessAudioRequestsCall @ sitepalPlayer_v1.js:1
vhssHTML_handleProcessAudioRequests @ sitepalPlayer_v1.js:1
sayText @ sitepalPlayer_v1.js:1
chatResponse @ sitepal.js:717
(anonymous) @ sitepal.js:656
Promise.then
startSystem @ sitepal.js:644
vh_sceneLoaded @ sitepal.js:743
vhssHTML5_loadedCallback @ sitepalPlayer_v1.js:1
(anonymous) @ sitepalPlayer_v1.js:1
(anonymous) @ sitepalPlayer_v1.js:1
Promise.then
checkUserInteraction @ sitepalPlayer_v1.js:1
characterFullyLoaded @ sitepalPlayer_v1.js:1
(anonymous) @ VM817 VHSSEngine_R.js:7
(anonymous) @ VM817 VHSSEngine_R.js:8
(anonymous) @ VM817 VHSSEngine_R.js:14
eH @ VM817 VHSSEngine_R.js:20
(anonymous) @ VM817 VHSSEngine_R.js:14
F9.req.onload @ VM817 VHSSEngine_R.js:7
XMLHttpRequest.send
F9 @ VM817 VHSSEngine_R.js:7
(anonymous) @ VM817 VHSSEngine_R.js:14
(anonymous) @ VM817 VHSSEngine_R.js:7
L5.load.image.onload @ VM817 VHSSEngine_R.js:13
sitepal:1 Access to XMLHttpRequest at 'http://cache-a.oddcast.com/tts/genC.php?EID=91&LID=2&VID=11&TXT=I%20understand%20you%20might%20be%20concerned%20due%20to%20the%20recent%20discovery%20of%20BRCA1%20gene%20mutation.%20In%20order%20to%20guide%20you%20appropriately%2C%20can%20you%20share%20with%20me%20whether%20you%20have%20had%20any%20breast%20screening%20tests%20such%20as%20a%...' from origin 'http://localhost:5000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VHSSEngine_R.js:24 GET http://cache-a.oddcast.com/tts/genC.php?EID=91&LID=2&VID=11&TXT=I%20understand%20you%20might%20be%20concerned%20due%20to%20the%20recent%20discovery%20of%20BRCA1%20gene%20mutation.%20In%20order%20to%20guide%20you%20appropriately%2C%20can%20you%20share%20with%20me%20whether%20you%20have%20had%20any%20breast%20screening%20tests%20such%20as%20a%... net::ERR_FAILED 503 (The server is temporarily unable to fulfill the request. OK to re-resubmit.)
Answer
Hello Francisco!
The parameters you are using for the say text call appear to be invalid.
EID (the engine ID) is 91 - there is no such engine.
I think you have the EID and VID switched. The Google 3rd party engine is 11.
If you switch those two values in the API call it should work fine.
Please check & let me know if I can further assist.
Regards,
Gil
The SitePal Team
Customer support service by UserEcho
Hello Francisco!
The parameters you are using for the say text call appear to be invalid.
EID (the engine ID) is 91 - there is no such engine.
I think you have the EID and VID switched. The Google 3rd party engine is 11.
If you switch those two values in the API call it should work fine.
Please check & let me know if I can further assist.
Regards,
Gil
The SitePal Team