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

Function main

tests/warmbench.py:4005–4040  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4003 str(scenario_dir / "cpp.timing.log"),
4004 "--output-dir",
4005 str(scenario_dir / "cpp_audio"),
4006 ]
4007 if args.test_noise_file:
4008 cpp_command.extend(["--noise-file", args.test_noise_file])
4009 for option in args.cpp_session_option:
4010 cpp_command.extend(["--session-option", option])
4011 return python_command, cpp_command
4012
4013
4014def build_vibevoice_commands(
4015 config: dict[str, Any],
4016 backend: str,
4017 args: argparse.Namespace,
4018 scenario_dir: Path,
4019 requests: list[dict[str, Any]],
4020) -> tuple[list[str], list[str]]:
4021 request_sequence_json = json.dumps(requests, ensure_ascii=False, separators=(",", ":"))
4022 model_path = args.model or config["model"]
4023 python_env = str(config.get("python_conda_env", "qwen3-tts"))
4024 model_root = Path(model_path)
4025 if not model_root.is_absolute():
4026 model_root = REPO_ROOT / model_root
4027 model_config = json.loads((model_root / "config.json").read_text(encoding="utf-8"))
4028 latent_size = int(model_config["acoustic_vae_dim"])
4029 decoder_capacity = int(model_config["decoder_config"]["max_position_embeddings"])
4030 total_speakers = sum(max(1, len(request.get("voice_samples", []))) for request in requests)
4031 prompt_noise_count = total_speakers + total_speakers * decoder_capacity * latent_size
4032 prompt_noise_path = scenario_dir / "shared_prompt_noise.f32"
4033 prompt_rng = random.Random(args.seed + 17)
4034 prompt_values = array.array("f", (prompt_rng.gauss(0.0, 1.0) for _ in range(prompt_noise_count)))
4035 prompt_noise_path.parent.mkdir(parents=True, exist_ok=True)
4036 with prompt_noise_path.open("wb") as handle:
4037 prompt_values.tofile(handle)
4038 prompt_noise_file = str(prompt_noise_path)
4039 noise_file = args.test_noise_file
4040 if not noise_file:
4041 max_new_tokens = max([int(request.get("max_new_tokens", 0)) for request in requests] + [0])
4042 if max_new_tokens <= 0:
4043 max_new_tokens = decoder_capacity

Callers 1

warmbench.pyFile · 0.70

Calls 11

next_artifact_dirFunction · 0.85
append_logFunction · 0.85
selected_backendsFunction · 0.85
aggregate_warmup_valueFunction · 0.85
selected_familiesFunction · 0.85
selected_modesFunction · 0.85
run_scenarioFunction · 0.85
printFunction · 0.85
parse_argsFunction · 0.70
timestamp_seconds_localFunction · 0.70

Tested by

no test coverage detected