Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,7 @@ speaker_model = EncoderClassifier.from_hparams(
|
|
28 |
savedir=os.path.join("/tmp", spk_model_name),
|
29 |
)
|
30 |
signal, fs =torchaudio.load('default_ratan_tata_voice.wav')
|
|
|
31 |
# Ensure to detach and clone before converting to tensor if needed
|
32 |
speaker_embeddings = speaker_model.encode_batch(signal) # Directly passing signal as a tensor, no need to wrap in torch.tensor
|
33 |
speaker_embeddings = torch.nn.functional.normalize(speaker_embeddings, dim=2) # Normalize the embeddings
|
|
|
28 |
savedir=os.path.join("/tmp", spk_model_name),
|
29 |
)
|
30 |
signal, fs =torchaudio.load('default_ratan_tata_voice.wav')
|
31 |
+
print(signal, fs)
|
32 |
# Ensure to detach and clone before converting to tensor if needed
|
33 |
speaker_embeddings = speaker_model.encode_batch(signal) # Directly passing signal as a tensor, no need to wrap in torch.tensor
|
34 |
speaker_embeddings = torch.nn.functional.normalize(speaker_embeddings, dim=2) # Normalize the embeddings
|