diff --git a/app/lib/services/sockets/transcription_connection.dart b/app/lib/services/sockets/transcription_connection.dart index d13ff38c272..abed86cd6a0 100644 --- a/app/lib/services/sockets/transcription_connection.dart +++ b/app/lib/services/sockets/transcription_connection.dart @@ -60,7 +60,11 @@ class TranscriptSegmentSocketService implements IPureSocketListener { '&include_speech_profile=$includeSpeechProfile&stt_service=${SharedPreferencesUtil().transcriptionModel}' '&conversation_timeout=${SharedPreferencesUtil().conversationSilenceDuration}'; - String url = '${Env.apiBaseUrl!.replaceAll('https', 'wss')}v4/listen$params'; + String url = Env.apiBaseUrl! + .replaceFirst('https://', 'wss://') + .replaceFirst('http://', 'ws://') + + 'v4/listen$params'; + _socket = PureSocket(url); _socket.setListener(this);