[email protected] commited on
Commit
8688376
·
1 Parent(s): 2161081
Files changed (1) hide show
  1. helpers/tts.js +11 -0
helpers/tts.js CHANGED
@@ -11,8 +11,19 @@ let SSML = `<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml
11
  </voice>
12
  </speak>`;
13
 
 
14
  const key = process.env.AZURE_KEY;
15
  const region = process.env.AZURE_REGION;
 
 
 
 
 
 
 
 
 
 
16
 
17
  /**
18
  * Node.js server code to convert text to speech
 
11
  </voice>
12
  </speak>`;
13
 
14
+
15
  const key = process.env.AZURE_KEY;
16
  const region = process.env.AZURE_REGION;
17
+
18
+ // Check if variables are loaded
19
+ if (!key || !region) {
20
+ console.error("❌ Azure Speech API key or region is missing!");
21
+ process.exit(1);
22
+ } else {
23
+ console.log("✅ Environment variables loaded successfully");
24
+ }
25
+
26
+
27
 
28
  /**
29
  * Node.js server code to convert text to speech