Skip to content

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Mar 8, 2024
1 parent 2c4b952 commit d44ea5a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Real-time speech recognition from a microphone with sherpa-onnx Python API
# with endpoint detection.
#
# Note: This script uses ALSA and works only on Linux systems.
# Note: This script uses ALSA and works only on Linux systems, especially
# for embedding Linux systems and for running Linux on Windows using WSL.
#
# Please refer to
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/index.html
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#endif

#if __ANDROID_API__ >= 27
#include "nnapi_provider_factory.h"
#include "nnapi_provider_factory.h" // NOLINT
#endif

namespace sherpa_onnx {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ as the device_name.
}
}

using namespace std::chrono_literals;
std::this_thread::sleep_for(20ms); // sleep for 20ms
using namespace std::chrono_literals; // NOLINT
std::this_thread::sleep_for(20ms); // sleep for 20ms
}

t.join();
Expand Down
4 changes: 2 additions & 2 deletions sherpa-onnx/csrc/sherpa-onnx-alsa-offline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ as the device_name.
}
}

using namespace std::chrono_literals;
std::this_thread::sleep_for(20ms); // sleep for 20ms
using namespace std::chrono_literals; // NOLINT
std::this_thread::sleep_for(20ms); // sleep for 20ms
}
t.join();
t2.join();
Expand Down
4 changes: 0 additions & 4 deletions sherpa-onnx/csrc/sherpa-onnx-keyword-spotter-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ card 3: UACDemoV10 [UACDemoV1.0], device 0: USB Audio [USB Audio]
and if you want to select card 3 and the device 0 on that card, please use:
hw:3,0
or
plughw:3,0
as the device_name.
Expand Down
2 changes: 2 additions & 0 deletions sherpa-onnx/python/csrc/alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "sherpa-onnx/python/csrc/alsa.h"

#include <vector>

#include "sherpa-onnx/csrc/alsa.h"

namespace sherpa_onnx {
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/python/csrc/faked-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace sherpa_onnx {

class FakedAlsa {
public:
FakedAlsa(const char *) {
explicit FakedAlsa(const char *) {
SHERPA_ONNX_LOGE("This function is for Linux only.");
#if (SHERPA_ONNX_ENABLE_ALSA == 0) && (defined(__unix__) || defined(__unix))
SHERPA_ONNX_LOGE(R"doc(
Expand Down

0 comments on commit d44ea5a

Please sign in to comment.