Phase 6: Add Deepgram remote transcription (managed + BYOK modes)
New files: - client/deepgram_transcription.py — DeepgramTranscriptionEngine with managed mode (proxy) and BYOK mode (direct Deepgram). Sends raw binary PCM audio over WebSocket, handles both proxy and Deepgram response formats. Modified files: - config/default_config.yaml — Replace remote_processing with new remote section (mode, server_url, auth_token, byok_api_key, deepgram_model, language) - client/config.py — Add migration from old remote_processing config - gui/settings_dialog_qt.py — Replace Remote Processing group with Transcription Mode section (Local/Managed/BYOK radio buttons, login/register dialogs, balance display, model selector) - gui/main_window_qt.py — Select engine based on remote.mode config, add error and credits_low handlers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,25 @@ class Config:
|
||||
# Save the default configuration
|
||||
self.save()
|
||||
|
||||
# Migrate remote_processing -> remote
|
||||
self._migrate_remote_config()
|
||||
|
||||
def _migrate_remote_config(self):
|
||||
"""Migrate old remote_processing config to new remote config."""
|
||||
if 'remote_processing' in self.config and 'remote' not in self.config:
|
||||
old = self.config['remote_processing']
|
||||
self.config['remote'] = {
|
||||
'mode': 'managed' if old.get('enabled', False) else 'local',
|
||||
'server_url': old.get('server_url', ''),
|
||||
'auth_token': '',
|
||||
'byok_api_key': old.get('api_key', ''),
|
||||
'deepgram_model': 'nova-2',
|
||||
'language': 'en-US',
|
||||
'fallback_to_local': old.get('fallback_to_local', True),
|
||||
}
|
||||
del self.config['remote_processing']
|
||||
self.save()
|
||||
|
||||
def save(self) -> None:
|
||||
"""Save current configuration to file."""
|
||||
with open(self.config_path, 'w') as f:
|
||||
|
||||
Reference in New Issue
Block a user