MCPcopy Create free account
hub / github.com/Arm-Examples/ML-examples / get_filename

Function get_filename

kleidiai-examples/audiogen/app/audiogen.cpp:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static std::string get_filename(std::string prompt, size_t seed) {
112 // Convert spaces to underscores
113 std::replace(prompt.begin(), prompt.end(), ' ', '_');
114
115 // Convert to lowercase
116 std::transform(prompt.begin(), prompt.end(), prompt.begin(),
117 [](unsigned char c) { return std::tolower(c); });
118
119 return prompt + "_" + std::to_string(seed) + ".wav";
120}
121
122static std::vector<int32_t> convert_prompt_to_ids(const std::string& prompt, const std::string& spiece_model_path) {
123 sentencepiece::SentencePieceProcessor sp;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected