コード例 #1
0
    def test_create_log_mel_features(self, art_warning, audio_batch_padded):
        try:
            test_input, _ = audio_batch_padded
            lingvo = TensorFlowLingvoASR()
            features_tf = lingvo._create_log_mel_features(lingvo._x_padded)

            features = lingvo._sess.run(features_tf,
                                        {lingvo._x_padded: test_input})
            assert features.shape[2] == 80
            assert len(features.shape) == 4
        except ARTTestException as e:
            art_warning(e)
コード例 #2
0
    def test_create_log_mel_features(self, art_warning, audio_batch_padded):
        try:
            import tensorflow.compat.v1 as tf1

            tf1.reset_default_graph()

            test_input, _ = audio_batch_padded
            lingvo = TensorFlowLingvoASR()
            features_tf = lingvo._create_log_mel_features(lingvo._x_padded)

            features = lingvo._sess.run(features_tf,
                                        {lingvo._x_padded: test_input})
            assert features.shape[2] == 80
            assert len(features.shape) == 4
        except ARTTestException as e:
            art_warning(e)