def apply_mask(spec, mask):
mag_spec = tf.abs(spec)
phase_spec = get_phase(spec)
return tf.multiply(tf.cast(tf.multiply(mag_spec, mask), tf.complex64), tf.exp(tf.complex(tf.zeros_like(mag_spec), phase_spec)))
评论列表
文章目录