1MR commited on
Commit
8d8ce1a
·
verified ·
1 Parent(s): fbe7105

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -8,6 +8,7 @@ import sounddevice as sd
8
  from scipy.io.wavfile import write
9
  import tempfile
10
  import os
 
11
 
12
  # Initialize FastAPI app
13
  app = FastAPI()
@@ -122,4 +123,7 @@ async def speak(request: SpeakRequest):
122
  engine.runAndWait()
123
  return {"message": "Text spoken successfully"}
124
  except Exception as e:
125
- raise HTTPException(status_code=500, detail=str(e))
 
 
 
 
8
  from scipy.io.wavfile import write
9
  import tempfile
10
  import os
11
+ import uvicorn
12
 
13
  # Initialize FastAPI app
14
  app = FastAPI()
 
123
  engine.runAndWait()
124
  return {"message": "Text spoken successfully"}
125
  except Exception as e:
126
+ raise HTTPException(status_code=500, detail=str(e))
127
+
128
+ if __name__ == "__main__":
129
+ uvicorn.run("app:app", host="0.0.0.0", port=8000, reload=True)