Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ import boto3
|
|
| 11 |
# from pyannote.audio.pipelines import VoiceActivityDetection
|
| 12 |
import datetime
|
| 13 |
import time
|
|
|
|
| 14 |
|
| 15 |
print("cuda", torch.cuda.is_available())
|
| 16 |
|
|
@@ -139,6 +140,7 @@ def streaming_audio_transcribe_last_segment(stream, current_speaches, old_text,
|
|
| 139 |
|
| 140 |
return stream, current_speaches, old_text, last_text, all_text
|
| 141 |
|
|
|
|
| 142 |
def transcribe(state, audio):
|
| 143 |
|
| 144 |
sr, y = audio
|
|
|
|
| 11 |
# from pyannote.audio.pipelines import VoiceActivityDetection
|
| 12 |
import datetime
|
| 13 |
import time
|
| 14 |
+
import spaces
|
| 15 |
|
| 16 |
print("cuda", torch.cuda.is_available())
|
| 17 |
|
|
|
|
| 140 |
|
| 141 |
return stream, current_speaches, old_text, last_text, all_text
|
| 142 |
|
| 143 |
+
@spaces.GPU
|
| 144 |
def transcribe(state, audio):
|
| 145 |
|
| 146 |
sr, y = audio
|