Module: tf.audio

  用于音频文件(16进制)的编码和解码。

   tf.audio.decode_wav()

 

tf.audio.decode_wav(
    contents,
    desired_channels=-1,
    desired_samples=-1,
    name=None
)
Args:
  contents: 一个字符串类型的张量,通常是一个被编码的wav音频文件。
        A Tensor of type string. The WAV-encoded audio, usually from a file.   desired_channels: An optional int. Defaults to -1. 想要的样本通道数   desired_samples: An optional int. Defaults to -1. 请求的音频长度   name: A name for the operation (optional).
返回:
A tuple of Tensor objects (audio, sample_rate) audio: A Tensor of type float32. sample_rate: A Tensor of type int32.

 

  tf.audio.encode_wav()
    tf.audio.encode_wav(
        audio,
        sample_rate,
        name=None
    )
    Args:
        audio: A Tensor of type float32. 2-D with shape [length, channels].
        sample_rate: 整数类型的张量,包含采样频率的标量。
             A Tensor of type int32. Scalar containing the sample frequency. name: A name for the operation (optional).
    Returns:
        A Tensor of type string.字符串类型的张量

  

Module: tf.autograph

  set_verbosity(...):设置AutoGraph详细级别。

  to_code(...):类似于to_graph,但返回Python源代码作为字符串。

  to_graph(...):将Python实体转换为TensorFlow图。

  trace(...):在编译时跟踪参数信息。

  tf.autograph.set_verbosity()

    设置AutoGraph详细级别。

    tf.autograph.set_verbosity(
        level,
        alsologtostdout=False
    )

  

 

清澈的爱,只为中国