MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / detect_language

Method detect_language

python/cpp/whisper.cc:83–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 std::vector<std::vector<std::pair<std::string, float>>>
84 detect_language(const StorageView& features) {
85 std::shared_lock lock(_mutex);
86 assert_model_is_ready();
87 auto futures = _pool->detect_language(features);
88 return wait_on_futures(std::move(futures));
89 }
90
91 std::vector<models::WhisperAlignmentResult>
92 align(const StorageView& features,

Callers 1

Calls 1

wait_on_futuresFunction · 0.85

Tested by 1