pub struct Config {
pub out_dir: PathBuf,
pub max_render_secs: f64,
pub lang: &'static str,
pub max_inline: usize,
pub tones: Vec<UserLibrary>,
pub ref_dir: Option<PathBuf>,
pub write_files: bool,
}Expand description
サーバーの設定。
Fields§
§out_dir: PathBufrender_mml が WAV を書くフォルダ。ここ以外には書かない。
max_render_secs: f64render_mml で書き出す長さの上限(秒)。長すぎる曲でメモリを使い切らないため。
lang: &'static strAI が読む文の言語(ja なら日本語、それ以外は英語)。既定は PIKOPIKO_LANG、OS の言語設定の順
(detect_lang)。
max_inline: usizebuild_mml の inline で文字列にして返せるバイナリの大きさ(バイト)。
tones: Vec<UserLibrary>利用者の音色集(--tones・PIKOPIKO_TONES)。#include "@名前/種類" で読め、list_synths と
get_tones にも出る(measure_tone の timbre に #include の行を付けても測れる)。
ref_dir: Option<PathBuf>measure_tone の reference で読める参照音(WAV)のフォルダー(--ref-dir・
PIKOPIKO_MCP_REF_DIR)。この直下のファイルだけを読む(生成AI が任意のファイルを読む口に
しないため。試聴の書き出し先 out_dir とも分ける)。None なら reference はエラー。
write_files: boolrender_mml がファイルを書くか。false(HTTP のとき)なら何も書かず、音(WAV)は
結果に埋めて返す(大きすぎればツールのエラー)。VGM も埋め込み(Base64)で返す。
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more