update offline-stream

This commit is contained in:
雾聪 2024-03-14 15:37:47 +08:00
parent 3549c0106e
commit c76c6da543

View File

@ -38,6 +38,10 @@ OfflineStream::OfflineStream(std::map<std::string, std::string>& model_path, int
if(use_gpu){
#ifdef USE_GPU
asr_handle = make_unique<ParaformerTorch>();
#else
LOG(ERROR) <<"GPU is not supported! CPU will be used! If you want to use GPU, please add -DGPU=ON when cmake";
asr_handle = make_unique<Paraformer>();
use_gpu = false;
#endif
}else{
asr_handle = make_unique<Paraformer>();