now gpu fixed. gemini has a timeout ends earlier explanantion with a simple accurate time start

This commit is contained in:
nick huang 2026-03-17 20:49:14 +08:00
parent 938cec62f3
commit 6b0a5f3560
2 changed files with 3 additions and 2 deletions

View File

@ -177,7 +177,7 @@ void recognize_audio(struct whisper_context* ctx, const std::vector<float>& audi
wparams.max_len = 0;
wparams.translate = false;
wparams.no_context = true;
wparams.single_segment = true;
wparams.single_segment = false;
wparams.print_special = false;
wparams.token_timestamps = false;
@ -251,7 +251,7 @@ int main(int argc, char** argv) {
// 4. 初始化 Whisper 模型
struct whisper_context_params cparams = whisper_context_default_params();
cparams.use_gpu = false;
cparams.use_gpu = true;
printf("\n🚀 正在加载模型:%s\n", model_path);
struct whisper_context* ctx = whisper_init_from_file_with_params(model_path, cparams);

View File

@ -13,3 +13,4 @@ export CUDA_HOME=/usr/local/cuda-13.1
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/targets/x86_64-linux/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$(pwd)/build_gpu/src:$(pwd)/build_gpu/ggml/src:/usr/local/cuda-13.1/lib64:/usr/local/cuda-13.1/targets/x86_64-linux/lib:$LD_LIBRARY_PATH