Skip to content

Commit

Permalink
Will check if model from settings is supported for live transctiption (
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored May 19, 2024
1 parent fb4f86c commit 702c018
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions buzz/widgets/recording_transcriber_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,16 @@ def __init__(
if len(model_types) > 0:
default_model = TranscriptionModel(model_type=model_types[0])

selected_model = self.settings.value(
key=Settings.Key.RECORDING_TRANSCRIBER_MODEL,
default_value=default_model,
)

if selected_model is None or selected_model.model_type not in model_types:
selected_model = default_model

self.transcription_options = TranscriptionOptions(
model=self.settings.value(
key=Settings.Key.RECORDING_TRANSCRIBER_MODEL,
default_value=default_model,
),
model=selected_model,
task=self.settings.value(
key=Settings.Key.RECORDING_TRANSCRIBER_TASK,
default_value=Task.TRANSCRIBE,
Expand Down

0 comments on commit 702c018

Please sign in to comment.