Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/audio/whisper_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ enum class WhisperModelType {
* @brief Configuration for Whisper processor
*/
struct WhisperConfig {
#ifdef WHISPER_MODEL_PATH
std::string model_path = WHISPER_MODEL_PATH; ///< Path to whisper model file
#else
std::string model_path = ""; ///< Path to whisper model file (must be set manually)
#endif
std::string language = "auto"; ///< Language code ("auto", "zh", "en", etc.)
WhisperModelType model_type = WhisperModelType::TINY; ///< Model size selection
int n_threads = 4; ///< Number of threads for inference
Expand Down
4 changes: 4 additions & 0 deletions src/python/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

// Core ffvoice headers
#include "audio/audio_capture_device.h"
#ifdef ENABLE_RNNOISE
#include "audio/rnnoise_processor.h"
#endif
#include "audio/vad_segmenter.h"
#include "audio/whisper_processor.h"
#include "media/wav_writer.h"
Expand Down Expand Up @@ -207,6 +209,7 @@ PYBIND11_MODULE(_ffvoice, m) {
.def_static("get_default_input_device", &AudioCaptureDevice::GetDefaultInputDevice,
"Get default input device ID");

#ifdef ENABLE_RNNOISE
// ========== RNNoise Processor ==========

// RNNoiseConfig
Expand Down Expand Up @@ -254,6 +257,7 @@ PYBIND11_MODULE(_ffvoice, m) {
"Reset internal state")
.def("get_vad_probability", &RNNoiseProcessor::GetVADProbability,
"Get last VAD probability (0.0-1.0)");
#endif // ENABLE_RNNOISE

// ========== VAD Segmenter ==========

Expand Down
Loading