Spaces:
Running
Running
gpt-omni
commited on
Commit
·
7f2ec5e
1
Parent(s):
10c5815
update
Browse files
app.py
CHANGED
|
@@ -38,7 +38,7 @@ from litgpt.generate.base import sample
|
|
| 38 |
|
| 39 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 40 |
ckpt_dir = "./checkpoint"
|
| 41 |
-
streaming_output =
|
| 42 |
|
| 43 |
|
| 44 |
OUT_CHUNK = 4096
|
|
@@ -310,7 +310,7 @@ def process_audio(audio):
|
|
| 310 |
filepath = audio
|
| 311 |
print(f"filepath: {filepath}")
|
| 312 |
if filepath is None:
|
| 313 |
-
return
|
| 314 |
|
| 315 |
cnt = 0
|
| 316 |
tik = time.time()
|
|
|
|
| 38 |
|
| 39 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 40 |
ckpt_dir = "./checkpoint"
|
| 41 |
+
streaming_output = False
|
| 42 |
|
| 43 |
|
| 44 |
OUT_CHUNK = 4096
|
|
|
|
| 310 |
filepath = audio
|
| 311 |
print(f"filepath: {filepath}")
|
| 312 |
if filepath is None:
|
| 313 |
+
return OUT_RATE, np.zeros((100, OUT_CHANNELS), dtype=np.int16)
|
| 314 |
|
| 315 |
cnt = 0
|
| 316 |
tik = time.time()
|