Spaces:
Runtime error
Runtime error
Commit
·
8eca13f
1
Parent(s):
d90b6b8
update speech key
Browse files
app.py
CHANGED
@@ -228,7 +228,7 @@ def Text2Sound(text):
|
|
228 |
|
229 |
|
230 |
def get_azure_access_token():
|
231 |
-
azure_key = os.environ.get("
|
232 |
try:
|
233 |
response = requests.post(
|
234 |
"https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken",
|
@@ -240,7 +240,7 @@ def get_azure_access_token():
|
|
240 |
except requests.exceptions.RequestException as e:
|
241 |
print(f"Error: {e}")
|
242 |
return None
|
243 |
-
|
244 |
return response.text
|
245 |
|
246 |
|
|
|
228 |
|
229 |
|
230 |
def get_azure_access_token():
|
231 |
+
azure_key = os.environ.get("SPEECH_KEY")
|
232 |
try:
|
233 |
response = requests.post(
|
234 |
"https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken",
|
|
|
240 |
except requests.exceptions.RequestException as e:
|
241 |
print(f"Error: {e}")
|
242 |
return None
|
243 |
+
print (response.text)
|
244 |
return response.text
|
245 |
|
246 |
|