Upload handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
|
@@ -13,7 +13,9 @@ class EndpointHandler:
|
|
| 13 |
raise ValueError("Missing required 'inputs' field in request data.")
|
| 14 |
|
| 15 |
try:
|
|
|
|
| 16 |
speech = self.synthesiser(text_prompt, forward_params={"do_sample": True})
|
|
|
|
| 17 |
audio_data = speech["audio"] # Assuming audio is in a NumPy array
|
| 18 |
sampling_rate = speech["sampling_rate"]
|
| 19 |
|
|
|
|
| 13 |
raise ValueError("Missing required 'inputs' field in request data.")
|
| 14 |
|
| 15 |
try:
|
| 16 |
+
print(self.synthesiser)
|
| 17 |
speech = self.synthesiser(text_prompt, forward_params={"do_sample": True})
|
| 18 |
+
print(speech)
|
| 19 |
audio_data = speech["audio"] # Assuming audio is in a NumPy array
|
| 20 |
sampling_rate = speech["sampling_rate"]
|
| 21 |
|