Project

General

Profile

Template
reco_vosk.cpp File Reference
#include "reco_vosk.h"
#include <iostream>
#include <sstream>
#include <algorithm>
#include "nlohmann/json.hpp"
#include <sys/stat.h>

Go to the source code of this file.

Macros

#define DEF_SAMPLES   16000
 utils libraries
 
#define FRAME_SIZE   320
 
#define MAX_RECOGNITION_TIME   2500
 
#define MAX_BUFFER   DEF_SAMPLES*10
 
#define DEF_BUFFER   DEF_SAMPLES
 
#define P_SLASH   "/"
 

Typedefs

using json = nlohmann::json
 

Functions

bool fileExists (const std::string &filePath)
 
std::string getDirectoryFromFilePath (const std::string &filePath)
 
std::string getFileNameWithoutExtension (const std::string &filePath)
 
std::string getValueFromJson (const std::string &jsonString, const std::string &key)
 
int countWords (const std::string &text)
 

Macro Definition Documentation

◆ DEF_BUFFER

#define DEF_BUFFER   DEF_SAMPLES

Definition at line 40 of file reco_vosk.cpp.

◆ DEF_SAMPLES

#define DEF_SAMPLES   16000

utils libraries

Definition at line 36 of file reco_vosk.cpp.

◆ FRAME_SIZE

#define FRAME_SIZE   320

Definition at line 37 of file reco_vosk.cpp.

◆ MAX_BUFFER

#define MAX_BUFFER   DEF_SAMPLES*10

Definition at line 39 of file reco_vosk.cpp.

◆ MAX_RECOGNITION_TIME

#define MAX_RECOGNITION_TIME   2500

Definition at line 38 of file reco_vosk.cpp.

◆ P_SLASH

#define P_SLASH   "/"

Definition at line 71 of file reco_vosk.cpp.

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 48 of file reco_vosk.cpp.

Function Documentation

◆ countWords()

int countWords ( const std::string &  text)

Definition at line 229 of file reco_vosk.cpp.

◆ fileExists()

bool fileExists ( const std::string &  filePath)

Definition at line 64 of file reco_vosk.cpp.

◆ getDirectoryFromFilePath()

std::string getDirectoryFromFilePath ( const std::string &  filePath)

Definition at line 187 of file reco_vosk.cpp.

◆ getFileNameWithoutExtension()

std::string getFileNameWithoutExtension ( const std::string &  filePath)

Definition at line 197 of file reco_vosk.cpp.

◆ getValueFromJson()

std::string getValueFromJson ( const std::string &  jsonString,
const std::string &  key 
)

Definition at line 207 of file reco_vosk.cpp.