Files
Genarrative/server-rs/crates/platform-audio/src/lib.rs
T
kdletters 29e84a77d1
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 5m31s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 5m31s
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 5m47s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 5m48s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m43s
Project CI / AI game creator shell Rust crates (push) Successful in 2m3s
Project CI / Repository checks (push) Successful in 3m43s
Project CI / Frontend tests (push) Successful in 4m53s
Project CI / Native shell tests (push) Successful in 6m35s
Project CI / Backend tests (push) Successful in 7m25s
Project CI / AI game creator shell web tests (push) Successful in 2m35s
切换 Tiantoken 并删除旧 Vidu 音效
新增 TIANTOKEN_BASE_URL / TIANTOKEN_API_KEY 配置并切换文本与图片链路

保留 Suno VectorEngine 路径,删除旧 Vidu submit/poll/builder 实现

同步脚本、文档、测试与运行时 provider 路由
2026-09-15 19:43:35 +08:00

58 lines
2.5 KiB
Rust

mod background_music_prompt;
mod client;
mod download;
mod elevenlabs;
mod error;
mod mp3;
mod persist;
mod request;
mod response;
mod sound_effect_prompt;
mod types;
pub use background_music_prompt::{
ValidatedBackgroundMusicPrompt, background_music_prompt_char_count,
background_music_prompt_effective_char_count, canonicalize_background_music_prompt,
validate_background_music_completion_prompt, validate_background_music_generation_prompt,
};
pub use client::{
build_vector_engine_audio_http_client, resolve_audio_task_download_urls,
submit_background_music_task, submit_editor_background_music_task,
};
pub use download::{audio_mime_to_extension, download_generated_audio, normalize_audio_mime_type};
pub use elevenlabs::{
ELEVENLABS_PROVIDER, ELEVENLABS_SOUND_EFFECT_MODEL, ELEVENLABS_SOUND_EFFECT_OUTPUT_FORMAT,
ELEVENLABS_SOUND_EFFECT_PROMPT_INFLUENCE, ElevenLabsAudioSettings,
ElevenLabsGeneratedSoundEffect, ElevenLabsSoundEffectRequest,
build_elevenlabs_audio_http_client, build_elevenlabs_sound_effect_body,
elevenlabs_sound_generation_endpoint, generate_elevenlabs_sound_effect,
};
pub use error::{AudioError, AudioStatusHint};
pub use mp3::MAX_GENERATED_AUDIO_DURATION_SECONDS;
pub use persist::{
GeneratedAudioPersistInput, GeneratedAudioPersistSource, GeneratedAudioPersistTarget,
prepare_generated_audio_put_request,
};
pub use request::{
build_background_music_task_body, build_editor_background_music_task_body,
normalize_limited_text, normalize_limited_text_allow_empty, normalize_optional_text,
};
pub use response::{
extract_audio_urls, is_failed_task_status, is_pending_task_status, normalize_task_status,
};
pub use sound_effect_prompt::{
SOUND_EFFECT_DURATION_MAX_SECONDS, SOUND_EFFECT_DURATION_MIN_SECONDS,
SOUND_EFFECT_PROMPT_MAX_CODE_POINTS, ValidatedSoundEffectPrompt,
canonicalize_sound_effect_prompt, sound_effect_prompt_code_point_count,
sound_effect_prompt_contains_han, sound_effect_prompt_uses_only_latin_alphabetic_script,
validate_sound_effect_duration_seconds, validate_sound_effect_prompt,
};
pub use types::{
AudioTaskKind, AudioTaskResponse, BACKGROUND_MUSIC_PROMPT_SIMPLIFICATION_MAX_CHARS,
BackgroundMusicTaskRequest, DEFAULT_SOUND_EFFECT_DURATION_SECONDS, DownloadedAudio,
EditorBackgroundMusicTaskRequest, MAX_GENERATED_AUDIO_BYTES, SUNO_DEFAULT_MODEL,
SUNO_GPT_DESCRIPTION_PROMPT_MAX_CHARS, SUNO_PROMPT_MAX_CHARS, SUNO_TAGS_MAX_CHARS,
SUNO_TITLE_MAX_CHARS, VECTOR_ENGINE_PROVIDER, VECTOR_ENGINE_SUNO_PROVIDER,
VectorEngineAudioSettings,
};