Skip to content

AttributeError: 'str' object has no attribute 'dim' on Offline model Segmentation #1299

Closed Answered by hbredin
MustafaCQN asked this question in Q&A
Discussion options

You must be logged in to vote

Models expect tensors as input.
If you do want to apply a model on the whole file, the Inference class can be used to wrap the model.

from pyannote.audio import Inference
inference = Inference(offline_model)
output = inference('loudness-fixed.wav')

Please read the documentation for more details and options.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hbredin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants