(samples, hparams)
return tf.squeeze(features, 1)
EXPERIMENTAL: Log mel spec with ops that can be made TFLite compatible.
EXPERIMENTAL: Log mel spec with ops that can be made TFLite compatible.
EXPERIMENTAL : Log mel spec with ops that can be made TFLite compatible .
def tflite_compat_mel_from_samples(samples, hparams):
  """EXPERIMENTAL: Log mel spec with ops that can be made TFLite compatible."""
  features = melspec_input.build_mel_calculation_graph(
      samples, hparams.sample_rate,
      window_length_seconds=2048 / hparams.sample_rate,
      hop_length_seconds=(
          hparams.spec_hop_length / hparams.sample_rate),
      num_mel_bins=hparams.spec_n_bins,
      lower_edge_hz=hparams.spec_fmin,
      upper_edge_hz=hparams.sample_rate / 2.0,
      frame_width=1,
      frame_hop=1,
      tflite_compatible=False)  # False here, but would be True on device.
  return tf.squeeze(features, 1)
def tflite_compat_mel_from_samples ( samples , hparams ) : features = melspec_input . build_mel_calculation_graph ( samples , hparams . sample_rate , window_length_seconds = 2048 / hparams . sample_rate , hop_length_seconds = ( hparams . spec_hop_length / hparams . sample_rate ) , num_mel_bins = hparams . spec_n_bins , lower_edge_hz = hparams . spec_fmin , upper_edge_hz = hparams . sample_rate / 2.0 , frame_width = 1 , frame_hop = 1 , tflite_compatible = False ) # False here, but would be True on device. return tf . squeeze ( features , 1 )