Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import numpy as np
|
|
8 |
import cv2
|
9 |
from queue import Queue
|
10 |
import time
|
11 |
-
import google as genai
|
12 |
-
from google.
|
13 |
from azure.cognitiveservices.speech import SpeechConfig, SpeechSynthesizer, AudioConfig, ResultReason, CancellationReason
|
14 |
import sounddevice as sd
|
15 |
import soundfile as sf
|
@@ -325,9 +325,11 @@ def main():
|
|
325 |
print("Error: Gemini API Key is required. Provide it via --gemini-api-key or GEMINI_API_KEY environment variable.")
|
326 |
return 1
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
|
|
331 |
|
332 |
try:
|
333 |
# Create interaction loop
|
|
|
8 |
import cv2
|
9 |
from queue import Queue
|
10 |
import time
|
11 |
+
import google.generai as genai
|
12 |
+
from google.generai.types import Content, Part
|
13 |
from azure.cognitiveservices.speech import SpeechConfig, SpeechSynthesizer, AudioConfig, ResultReason, CancellationReason
|
14 |
import sounddevice as sd
|
15 |
import soundfile as sf
|
|
|
325 |
print("Error: Gemini API Key is required. Provide it via --gemini-api-key or GEMINI_API_KEY environment variable.")
|
326 |
return 1
|
327 |
|
328 |
+
# REMOVED: Azure Speech Key dependency check
|
329 |
+
# Now just use whatever is provided or default to disabled speech if key is missing
|
330 |
+
if not args.azure_speech_key:
|
331 |
+
args.no_speech = True
|
332 |
+
logging.warning("No Azure Speech Key provided. Speech synthesis will be disabled.")
|
333 |
|
334 |
try:
|
335 |
# Create interaction loop
|