Add protocol performance profiles
This commit is contained in:
@@ -34,6 +34,7 @@ from mka.application.people_yaml import (
|
||||
export_people_yaml,
|
||||
import_people_yaml,
|
||||
)
|
||||
from mka.application.performance import DEFAULT_PERFORMANCE_PROFILE, PERFORMANCE_PROFILES
|
||||
from mka.application.run_inputs import (
|
||||
RunInputJsonError,
|
||||
RunInputState,
|
||||
@@ -495,7 +496,13 @@ def _render_result() -> None:
|
||||
):
|
||||
try:
|
||||
with st.spinner("Regenerating protocol without rerunning audio processing..."):
|
||||
regenerated = service.regenerate_protocol(outcome.run_dir, selections)
|
||||
regenerated = service.regenerate_protocol(
|
||||
outcome.run_dir,
|
||||
selections,
|
||||
performance_profile=st.session_state.get(
|
||||
"performance_profile", DEFAULT_PERFORMANCE_PROFILE
|
||||
),
|
||||
)
|
||||
except (OSError, RuntimeError, ValueError) as exc:
|
||||
st.error(f"Protocol regeneration failed: {exc}")
|
||||
else:
|
||||
@@ -551,6 +558,13 @@ def main() -> None:
|
||||
participants = _render_participants()
|
||||
|
||||
st.header("Processing options")
|
||||
performance_profile = st.selectbox(
|
||||
"Performance profile",
|
||||
options=PERFORMANCE_PROFILES,
|
||||
format_func=str.title,
|
||||
key="performance_profile",
|
||||
help="Controls protocol-generation performance using an abstract runtime profile.",
|
||||
)
|
||||
audio_normalization = st.checkbox(
|
||||
"Audio normalization",
|
||||
value=True,
|
||||
@@ -619,6 +633,7 @@ def main() -> None:
|
||||
ProcessingOptions(
|
||||
diarization_enabled=diarization_enabled,
|
||||
audio_normalization=audio_normalization,
|
||||
performance_profile=performance_profile,
|
||||
),
|
||||
progress_sink=callback,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user