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

Function resolve_miocodec_case

tests/warmbench.py:750–773  ·  view source on GitHub ↗
(config: dict[str, Any], args: argparse.Namespace)

Source from the content-addressed store, hash-verified

748 for family in selected_families(args)
749 }
750 if len(values) == 1:
751 return next(iter(values))
752 return args.requests_per_session
753
754
755def load_omnivoice_case_catalog(path: Path) -> dict[str, dict[str, dict[str, Any]]]:
756 payload = json.loads(path.read_text(encoding="utf-8"))
757 if not isinstance(payload, dict):
758 raise RuntimeError(f"invalid OmniVoice case catalog: {path}")
759 return payload
760
761
762def resolve_omnivoice_case(
763 config: dict[str, Any],
764 args: argparse.Namespace,
765) -> tuple[list[str], dict[str, Any], dict[str, Any]]:
766 if args.case_names and args.texts:
767 raise RuntimeError("--case-name and --text are mutually exclusive for OmniVoice warmbench")
768
769 scenario_config = dict(config)
770 warmup_text = args.warmup_text or OMNIVOICE_DEFAULT_WARMUP_TEXT
771 request_manifest: dict[str, Any] = {"warmup_text": warmup_text}
772 if args.texts:
773 if len(args.texts) < args.requests_per_session:
774 raise RuntimeError(
775 f"need {args.requests_per_session} --text values, only received {len(args.texts)}"
776 )

Callers 1

run_scenarioFunction · 0.85

Calls 2

read_textMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected