Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -19,8 +19,10 @@ class EndpointHandler:
|
|
19 |
# Convert embedding to list to avoid serialization issues
|
20 |
speaker_embedding_list = speaker_embedding.tolist()
|
21 |
|
|
|
22 |
# Use the API to run the model
|
23 |
-
|
|
|
24 |
|
25 |
# Write the response audio to a file
|
26 |
# Note: This might not be possible in all environments, ensure this is suitable for your deployment
|
|
|
19 |
# Convert embedding to list to avoid serialization issues
|
20 |
speaker_embedding_list = speaker_embedding.tolist()
|
21 |
|
22 |
+
|
23 |
# Use the API to run the model
|
24 |
+
#parameters={"forward_params": {"speaker_embeddings": speaker_embedding_list}}
|
25 |
+
response = self.api(inputs=text, options={"wait_for_model": True})
|
26 |
|
27 |
# Write the response audio to a file
|
28 |
# Note: This might not be possible in all environments, ensure this is suitable for your deployment
|