add streaming websocket server and client (#62)
This commit is contained in:
28
sherpa-onnx/csrc/file-utils.h
Normal file
28
sherpa-onnx/csrc/file-utils.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// sherpa-onnx/csrc/file-utils.h
|
||||
//
|
||||
// Copyright (c) 2022-2023 Xiaomi Corporation
|
||||
|
||||
#ifndef SHERPA_ONNX_CSRC_FILE_UTILS_H_
|
||||
#define SHERPA_ONNX_CSRC_FILE_UTILS_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
/** Check whether a given path is a file or not
|
||||
*
|
||||
* @param filename Path to check.
|
||||
* @return Return true if the given path is a file; return false otherwise.
|
||||
*/
|
||||
bool FileExists(const std::string &filename);
|
||||
|
||||
/** Abort if the file does not exist.
|
||||
*
|
||||
* @param filename The file to check.
|
||||
*/
|
||||
void AssertFileExists(const std::string &filename);
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
#endif // SHERPA_ONNX_CSRC_FILE_UTILS_H_
|
||||
Reference in New Issue
Block a user