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

Method prepare

src/models/pocket_tts/session.cpp:739–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737runtime::VoiceTaskKind PocketTTSSession::task_kind() const {
738 return task_.task;
739}
740
741runtime::RunMode PocketTTSSession::run_mode() const {
742 return task_.mode;
743}
744
745void PocketTTSSession::prepare(const runtime::SessionPreparationRequest & request) {
746 prepared_session_request_ =
747 build_preparation_generation_request(request, manifest_->model_config.default_temperature);
748 if (!has_voice_selection(prepared_session_request_.voice)) {
749 throw std::runtime_error(
750 "PocketTTS session prepare() requires a session voice via --voice-id or --voice-ref");
751 }
752 if (const auto export_path = runtime::find_option(
753 request.options,
754 {"pocket_tts.export_voice_state_path", "export_voice_state_path"})) {
755 export_voice_state(prepared_session_request_.voice, *export_path);

Callers 3

prepare_generationMethod · 0.45
generateMethod · 0.45

Calls 3

has_voice_selectionFunction · 0.85
find_optionFunction · 0.85

Tested by

no test coverage detected