MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / load_processor

Function load_processor

src/framework/tokenizers/sentencepiece.cpp:56–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56ProcessorPtr load_processor(const std::filesystem::path & model_path) {
57 auto processor = std::make_shared<sentencepiece::SentencePieceProcessor>();
58 require_status(processor->Load(model_path.string()), "failed to load SentencePiece model");
59 return processor;
60}
61
62std::vector<SentencePiecePiece> extract_pieces(const sentencepiece::SentencePieceProcessor & processor) {
63 std::vector<SentencePiecePiece> pieces;

Callers 1

load_sentencepiece_modelFunction · 0.85

Calls 2

require_statusFunction · 0.85
LoadMethod · 0.45

Tested by

no test coverage detected