def create_parameter(samples, sample_period):
    """Create a HTK Parameter object from an array of samples and a samples period

    :param samples (list of lists or array of floats): The samples to write into the file. Usually feature vectors.
    :param sample_period (int): Sample period in 100ns units.
    """

    parm_kind_str = 'USER'
    parm_kind = _htk_str_to_param(parm_kind_str)
    parm_kind_base, parm_kind_opts = _htk_str_to_param(parm_kind_str)

    meta = ParameterMeta(n_samples=len(samples),
                         samp_period=sample_period,
                         samp_size=len(samples[0]) * 4,  # size in bytes
                         parm_kind_str=parm_kind_str,
                         parm_kind=parm_kind,
                         parm_kind_base=parm_kind_base,
                         parm_kind_opts=parm_kind_opts)
    return Parameter(meta=meta,
                     samples=np.array(samples))
def create_parameter ( samples , sample_period ) : parm_kind_str = 'USER' parm_kind = _htk_str_to_param ( parm_kind_str ) parm_kind_base , parm_kind_opts = _htk_str_to_param ( parm_kind_str ) meta = ParameterMeta ( n_samples = len ( samples ) , samp_period = sample_period , samp_size = len ( samples [ 0 ] ) * 4 , parm_kind_str = parm_kind_str , parm_kind = parm_kind , parm_kind_base = parm_kind_base , parm_kind_opts = parm_kind_opts ) return Parameter ( meta = meta , samples = np . array ( samples ) )
Create a HTK Parameter object from an array of samples and a samples period

    :param samples (list of lists or array of floats): The samples to write into the file. Usually feature vectors.
    :param sample_period (int): Sample period in 100ns units.