Archime commited on
Commit
9264815
·
1 Parent(s): 512b4c2

import spaces

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. app/utils.py +0 -1
app.py CHANGED
@@ -8,6 +8,7 @@ import time
8
  import threading
9
  import os # Added to check if file exists
10
  from gradio.utils import get_space
 
11
 
12
  from app.logger_config import logger as logging
13
  from app.utils import (
@@ -19,7 +20,7 @@ EXAMPLE_FILES = ["data/bonjour.wav", "data/bonjour2.wav"]
19
  # The default file is the first in the list
20
  DEFAULT_FILE = EXAMPLE_FILES[0]
21
  streaming_should_stop = threading.Event()
22
-
23
  def read_and_stream_audio(filepath_to_stream: str):
24
  """
25
  A synchronous generator that reads an audio file (via filepath_to_stream)
 
8
  import threading
9
  import os # Added to check if file exists
10
  from gradio.utils import get_space
11
+ import spaces
12
 
13
  from app.logger_config import logger as logging
14
  from app.utils import (
 
20
  # The default file is the first in the list
21
  DEFAULT_FILE = EXAMPLE_FILES[0]
22
  streaming_should_stop = threading.Event()
23
+ @spaces.GPU
24
  def read_and_stream_audio(filepath_to_stream: str):
25
  """
26
  A synchronous generator that reads an audio file (via filepath_to_stream)
app/utils.py CHANGED
@@ -85,5 +85,4 @@ def generate_coturn_config():
85
  }
86
  ]
87
  }
88
- print(coturn_config)
89
  return coturn_config
 
85
  }
86
  ]
87
  }
 
88
  return coturn_config