Skip to content

Commit

Permalink
Merge pull request #70 from annapovey/recognize_model_encoder_fix
Browse files Browse the repository at this point in the history
fix model encoder to use a different model than the default
  • Loading branch information
danpovey authored Aug 29, 2024
2 parents 973009a + 73f1267 commit 1199e12
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/libriheavy/tools/recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,13 @@ def decode_one_batch(
supervisions = batch["supervisions"]
feature_lens = supervisions["num_frames"].to(device)

encoder_out, encoder_out_lens = model.encoder(
features=feature,
feature_lengths=feature_lens,
)
#encoder_out, encoder_out_lens = model.encoder(
# features=feature,
# feature_lengths=feature_lens,
#)

# to use a different model than the default this fix is needed
encoder_out, encoder_out_lens = model.encoder(feature,feature_lens,)

if params.decoding_method == "greedy_search":
res = greedy_search_batch(
Expand Down

0 comments on commit 1199e12

Please sign in to comment.