Skip to content

Commit 4ade531

Browse files
rogiervdRogier van Dalen
andauthored
Make arpa_to_fst work when arguments are str (from Samsung, AI Center, Cambridge) (speechbrain#2919)
Co-authored-by: Rogier van Dalen <[email protected]>
1 parent 5d81ad1 commit 4ade531

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

speechbrain/lm/arpa.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ def arpa_to_fst(
325325
"Install using `pip install kaldilm`."
326326
)
327327

328+
if isinstance(out_fst, str):
329+
out_fst = Path(out_fst)
330+
if isinstance(in_arpa, str):
331+
in_arpa = Path(in_arpa)
332+
328333
if cache and out_fst.exists():
329334
return
330335
if not in_arpa.exists():

0 commit comments

Comments
 (0)