Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -15,8 +15,7 @@ logging.basicConfig(
|
|
| 15 |
)
|
| 16 |
|
| 17 |
# Load the embedding model globally to avoid reloading it every time
|
| 18 |
-
|
| 19 |
-
embedding_model = tf.saved_model.load("speech-embedding",tags=[])
|
| 20 |
def get_features(path, duration=5):
|
| 21 |
try:
|
| 22 |
# Load audio file with specific duration and offset to handle silent parts
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
# Load the embedding model globally to avoid reloading it every time
|
| 18 |
+
embedding_model = hub.load("https://www.kaggle.com/models/google/speech-embedding/TensorFlow1/speech-embedding/1")
|
|
|
|
| 19 |
def get_features(path, duration=5):
|
| 20 |
try:
|
| 21 |
# Load audio file with specific duration and offset to handle silent parts
|