Spaces:
Runtime error
Runtime error
Commit
Β·
2ffd15f
1
Parent(s):
5658da2
Help
Browse files
app.py
CHANGED
|
@@ -21,8 +21,8 @@ audio_embedding_system = AudioEmbeddingSystem(db_path=db_file, index_path=index_
|
|
| 21 |
|
| 22 |
def audio_search(audio_tuple):
|
| 23 |
sample_rate, array = audio_tuple
|
| 24 |
-
array
|
| 25 |
-
|
| 26 |
|
| 27 |
rows = audio_embedding_system.search((sample_rate, array))
|
| 28 |
print(rows)
|
|
|
|
| 21 |
|
| 22 |
def audio_search(audio_tuple):
|
| 23 |
sample_rate, array = audio_tuple
|
| 24 |
+
if array.dtype == np.int16:
|
| 25 |
+
array = array.astype(np.float32) / 32768.0
|
| 26 |
|
| 27 |
rows = audio_embedding_system.search((sample_rate, array))
|
| 28 |
print(rows)
|