OpenNMT / CTranslate2

Fast inference engine for Transformer models
https://opennmt.net/CTranslate2
MIT License
3.21k stars 282 forks source link

faster-whisper inferencing problem #1673

Open glory03023 opened 4 months ago

glory03023 commented 4 months ago

Hello, how are you? I am building faster-whisper windows POC by ctranslate2. And i created ctranslate2::models::Whisper object whisperpool. and write the code such as: std::vector<std::future> results; results = whisper_pool.generate(features, prompts, whisper_options); At this time, how can i get the result string from results object.?

minhthuc2502 commented 4 months ago

To get the result you could follow this minimum example.:

std::vector<ctranslate2::models::WhisperGenerationResult> outputs;
for (auto& result : results) {
  outputs.push_back(result.get);
}
// get result from outputs
...
glory03023 commented 4 months ago

Hi, @minhthuc2502 , thank you for your guide. have you ever tried to make faster-whisper run with pure c/c++ code? I have made visual studio project for windows POC. here is the link: https://github.com/glory03023/faster-whisper-windows.git And still getting error when running, could you please see on it and guide me what should i do to run it?