Dupaja commited on
Commit
9f3bcf5
·
1 Parent(s): 7b5f670

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -11,7 +11,7 @@ class EndpointHandler:
11
  self.api = InferenceApi(repo_id="microsoft/speecht5_tts", task="text-to-speech")
12
  self.embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
13
 
14
- def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
15
  text = data.get("inputs", "")
16
  # Extract speaker_embedding using the index from your dataset, or replace with your own logic.
17
  speaker_embedding = torch.tensor(self.embeddings_dataset[7306]["xvector"]).unsqueeze(0)
 
11
  self.api = InferenceApi(repo_id="microsoft/speecht5_tts", task="text-to-speech")
12
  self.embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
13
 
14
+ def __call__(self, data):
15
  text = data.get("inputs", "")
16
  # Extract speaker_embedding using the index from your dataset, or replace with your own logic.
17
  speaker_embedding = torch.tensor(self.embeddings_dataset[7306]["xvector"]).unsqueeze(0)