nttcslab-sp / kaldiio

A pure python module for reading and writing kaldi ark files
Other
248 stars 35 forks source link

Fix writing matrices to stdout #47

Closed Zinurist closed 4 years ago

Zinurist commented 4 years ago

Small fix for when passing 'ark:-' to the WriteHelper Before it would get a RecursionError, since it doesn't have the attribute _stream. You can test it with this example from the Readme:

import numpy
from kaldiio import WriteHelper
with WriteHelper('ark:-') as writer:
    for i in range(10):
        writer(str(i), numpy.random.randn(10, 10))
nttcslab-sp-admin commented 4 years ago

Thanks!