(cls, config=None)
return hparams
Set params.
    :param config: contains nine optional parameters：
          --sample_rate     : Waveform data sample frequency (must match the waveform
                              file, if specified there). (float, default = 16000)
          --window_length		: Window length in seconds. (float, default = 0.025)
          --frame_length		: Hop length in seconds. (float, default = 0.010)
          --snip_edges			: If True, the last frame (shorter than window_length)
                                  will be cutoff. If False, 1 // 2 frame_length data will
                                  be padded to data. (bool, default = True)
          ---raw_energy			: If 1, compute frame energy before preemphasis and windowing.
                                  If 2,  compute frame energy after preemphasis and windowing.
                                  (int, default = 1)
          --preeph_coeff		: Coefficient for use in frame-signal preemphasis.
                                 (float, default = 0.97)
          --window_type			: Type of window ("hamm"|"hann"|"povey"|"rect"|"blac"|"tria").
                                  (string, default = "povey")
          --remove_dc_offset	: Subtract mean from waveform on each frame.
                                 (bool, default = true)
          --is_fbank			: If true, compute power spetrum without frame energy.
                                  If false, using the frame energy instead of the square of the
                                  constant component of the signal. (bool, default = false)
          --output_type			: If 1, return power spectrum. If 2, return log-power spectrum.
                                  If 3, return magnitude spectrum. (int, default = 2)
          --dither		        : Dithering constant (0.0 means no dither).
                                 (float, default = 1) [add robust to training]
    :return: An object of class HParams, which is a set of hyperparameters as name-value pairs.
Set params.
    :param config: contains nine optional parameters：
          --sample_rate     : Waveform data sample frequency (must match the waveform
                              file, if specified there). (float, default = 16000)
          --window_length		: Window length in seconds. (float, default = 0.025)
          --frame_length		: Hop length in seconds. (float, default = 0.010)
          --snip_edges			: If True, the last frame (shorter than window_length)
                                  will be cutoff. If False, 1 // 2 frame_length data will
                                  be padded to data. (bool, default = True)
          ---raw_energy			: If 1, compute frame energy before preemphasis and windowing.
                                  If 2,  compute frame energy after preemphasis and windowing.
                                  (int, default = 1)
          --preeph_coeff		: Coefficient for use in frame-signal preemphasis.
                                 (float, default = 0.97)
          --window_type			: Type of window ("hamm"|"hann"|"povey"|"rect"|"blac"|"tria").
                                  (string, default = "povey")
          --remove_dc_offset	: Subtract mean from waveform on each frame.
                                 (bool, default = true)
          --is_fbank			: If true, compute power spetrum without frame energy.
                                  If false, using the frame energy instead of the square of the
                                  constant component of the signal. (bool, default = false)
          --output_type			: If 1, return power spectrum. If 2, return log-power spectrum.
                                  If 3, return magnitude spectrum. (int, default = 2)
          --dither		        : Dithering constant (0.0 means no dither).
                                 (float, default = 1) [add robust to training]
    :return: An object of class HParams, which is a set of hyperparameters as name-value pairs.
Set params . : param config : contains nine optional parameters： -- sample_rate : Waveform data sample frequency ( must match the waveform file if specified there ) . ( float default = 16000 ) -- window_length : Window length in seconds . ( float default = 0 . 025 ) -- frame_length : Hop length in seconds . ( float default = 0 . 010 ) -- snip_edges : If True the last frame ( shorter than window_length ) will be cutoff . If False 1 // 2 frame_length data will be padded to data . ( bool default = True ) --- raw_energy : If 1 compute frame energy before preemphasis and windowing . If 2 compute frame energy after preemphasis and windowing . ( int default = 1 ) -- preeph_coeff : Coefficient for use in frame - signal preemphasis . ( float default = 0 . 97 ) -- window_type : Type of window ( hamm | hann | povey | rect | blac | tria ) . ( string default = povey ) -- remove_dc_offset : Subtract mean from waveform on each frame . ( bool default = true ) -- is_fbank : If true compute power spetrum without frame energy . If false using the frame energy instead of the square of the constant component of the signal . ( bool default = false ) -- output_type : If 1 return power spectrum . If 2 return log - power spectrum . If 3 return magnitude spectrum . ( int default = 2 ) -- dither : Dithering constant ( 0 . 0 means no dither ) . ( float default = 1 ) [ add robust to training ] : return : An object of class HParams which is a set of hyperparameters as name - value pairs .
def params(cls, config=None):
    """
    Set params.
    :param config: contains nine optional parameters：
          --sample_rate     : Waveform data sample frequency (must match the waveform
                              file, if specified there). (float, default = 16000)
          --window_length		: Window length in seconds. (float, default = 0.025)
          --frame_length		: Hop length in seconds. (float, default = 0.010)
          --snip_edges			: If True, the last frame (shorter than window_length)
                                  will be cutoff. If False, 1 // 2 frame_length data will
                                  be padded to data. (bool, default = True)
          ---raw_energy			: If 1, compute frame energy before preemphasis and windowing.
                                  If 2,  compute frame energy after preemphasis and windowing.
                                  (int, default = 1)
          --preeph_coeff		: Coefficient for use in frame-signal preemphasis.
                                 (float, default = 0.97)
          --window_type			: Type of window ("hamm"|"hann"|"povey"|"rect"|"blac"|"tria").
                                  (string, default = "povey")
          --remove_dc_offset	: Subtract mean from waveform on each frame.
                                 (bool, default = true)
          --is_fbank			: If true, compute power spetrum without frame energy.
                                  If false, using the frame energy instead of the square of the
                                  constant component of the signal. (bool, default = false)
          --output_type			: If 1, return power spectrum. If 2, return log-power spectrum.
                                  If 3, return magnitude spectrum. (int, default = 2)
          --dither		        : Dithering constant (0.0 means no dither).
                                 (float, default = 1) [add robust to training]
    :return: An object of class HParams, which is a set of hyperparameters as name-value pairs.
    """

    window_length = 0.025
    frame_length = 0.010
    output_type = 2
    sample_rate = 16000
    snip_edges = True
    raw_energy = 1
    preeph_coeff = 0.97
    window_type = 'povey'
    remove_dc_offset = True
    is_fbank = False
    dither = 0.0

    hparams = HParams(cls=cls)
    hparams.add_hparam('window_length', window_length)
    hparams.add_hparam('frame_length', frame_length)
    hparams.add_hparam('output_type', output_type)
    hparams.add_hparam('sample_rate', sample_rate)
    hparams.add_hparam('snip_edges', snip_edges)
    hparams.add_hparam('raw_energy', raw_energy)
    hparams.add_hparam('preeph_coeff', preeph_coeff)
    hparams.add_hparam('window_type', window_type)
    hparams.add_hparam('remove_dc_offset', remove_dc_offset)
    hparams.add_hparam('is_fbank', is_fbank)
    hparams.add_hparam('dither', dither)

    if config is not None:
      hparams.override_from_dict(config)

    return hparams
def params ( cls , config = None ) : window_length = 0.025 frame_length = 0.010 output_type = 2 sample_rate = 16000 snip_edges = True raw_energy = 1 preeph_coeff = 0.97 window_type = 'povey' remove_dc_offset = True is_fbank = False dither = 0.0 hparams = HParams ( cls = cls ) hparams . add_hparam ( 'window_length' , window_length ) hparams . add_hparam ( 'frame_length' , frame_length ) hparams . add_hparam ( 'output_type' , output_type ) hparams . add_hparam ( 'sample_rate' , sample_rate ) hparams . add_hparam ( 'snip_edges' , snip_edges ) hparams . add_hparam ( 'raw_energy' , raw_energy ) hparams . add_hparam ( 'preeph_coeff' , preeph_coeff ) hparams . add_hparam ( 'window_type' , window_type ) hparams . add_hparam ( 'remove_dc_offset' , remove_dc_offset ) hparams . add_hparam ( 'is_fbank' , is_fbank ) hparams . add_hparam ( 'dither' , dither ) if config is not None : hparams . override_from_dict ( config ) return hparams