suvradip2000 commited on
Commit
12ef768
·
verified ·
1 Parent(s): 0c6674a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -0
main.py CHANGED
@@ -12,6 +12,15 @@ import os
12
  r = sr.Recognizer()
13
 
14
  app = FastAPI()
 
 
 
 
 
 
 
 
 
15
 
16
  def resample_audio(input_path, output_path, target_sample_rate):
17
  ffmpeg_cmd = [
 
12
  r = sr.Recognizer()
13
 
14
  app = FastAPI()
15
+ origins = ["*"]
16
+
17
+ app.add_middleware(
18
+ CORSMiddleware,
19
+ allow_origins=origins,
20
+ allow_credentials=True,
21
+ allow_methods=["*"],
22
+ allow_headers=["*"],
23
+ )
24
 
25
  def resample_audio(input_path, output_path, target_sample_rate):
26
  ffmpeg_cmd = [