Merge pull request #2102 from zh794390558/format

[audio] format and cpplint
pull/2108/head
Hui Zhang 3 years ago committed by GitHub
commit da6692c7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,7 +45,7 @@ exec 1>&2
cpplint=cpplint
sum=0
filters='-build/include_order,-build/namespaces,-legal/copyright,-runtime/references,-build/include_what_you_use'
filters='-build/include_order,-build/namespaces,-legal/copyright,-runtime/references,-build/include_what_you_use,-whitespace/indent,-build/header_guard'
# for cpp
for file in $(git diff-index --name-status $against -- | grep -E '\.[ch](pp)?$' | awk '{print $2}'); do

@ -108,9 +108,11 @@ def is_soundfile_available():
def requires_soundfile():
if is_soundfile_available():
def decorator(func):
return func
else:
def decorator(func):
@wraps(func)
def wrapped(*args, **kwargs):
@ -128,9 +130,11 @@ def is_sox_available():
def requires_sox():
if is_sox_available():
def decorator(func):
return func
else:
def decorator(func):
@wraps(func)
def wrapped(*args, **kwargs):

@ -77,7 +77,8 @@ bool InitFbank(float samp_freq, // frame opts
}
py::array_t<double> ComputeFbankStreaming(const py::array_t<double>& wav) {
return paddleaudio::kaldi::KaldiFeatureWrapper::GetInstance()->ComputeFbank(wav);
return paddleaudio::kaldi::KaldiFeatureWrapper::GetInstance()->ComputeFbank(
wav);
}
py::array_t<double> ComputeFbank(
@ -144,5 +145,5 @@ void ResetFbank() {
paddleaudio::kaldi::KaldiFeatureWrapper::GetInstance()->ResetFbank();
}
} // kaldi
} // paddleaudio
} // namespace kaldi
} // namespace paddleaudio

@ -16,6 +16,7 @@
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <string>
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h"

@ -1,8 +1,8 @@
// Copyright (c) 2017 Facebook Inc. (Soumith Chintala), All rights reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#include "paddlespeech/audio/src/pybind/sox/io.h"
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h"
#include "paddlespeech/audio/src/pybind/sox/io.h"
// Sox
PYBIND11_MODULE(_paddleaudio, m) {

@ -499,6 +499,15 @@ class SymbolicShapeInference:
'Attention', 'BiasGelu', \
'EmbedLayerNormalization', \
'FastGelu', 'Gelu', 'LayerNormalization', \

@ -35,7 +35,8 @@ def _get_build(var, default=False):
_BUILD_SOX = False if platform.system() == "Windows" else _get_build(
"BUILD_SOX", True)
_BUILD_MAD = _get_build("BUILD_MAD", False)
_BUILD_KALDI = False if platform.system() == "Windows" else _get_build("BUILD_KALDI", True)
_BUILD_KALDI = False if platform.system() == "Windows" else _get_build(
"BUILD_KALDI", True)
# _BUILD_RNNT = _get_build("BUILD_RNNT", True)
# _BUILD_CTC_DECODER = False if platform.system() == "Windows" else _get_build("BUILD_CTC_DECODER", True)
# _USE_FFMPEG = _get_build("USE_FFMPEG", False)

Loading…
Cancel
Save