Skip to main content

v8.4.1

This release adds voice input to the Catalyst AI (CT Bot) chat widget. Recordings are uploaded as CtBotTranscription records, transcribed in the background, and the text is streamed back to the widget over ActionCable. Transcription cost is recorded as CtCostTracking, like chat replies.

Required Migration​

New ct_bot_transcriptions Table​

Voice recordings and their transcribed text are stored in a new ct_bot_transcriptions table:

ColumnTypePurpose
user_idreference (FK, not null)The user who recorded the audio
ct_bot_conversation_idreference (FK)The open conversation at recording time, if any
ct_bot_message_idreference (FK)The message the transcription was sent with, once linked
request_idstringClient request ID used to route the result to the right widget
statusinteger (enum)pending, success, failed
texttextThe transcribed text
error_messagestringFailure reason, if any
total_cost_centsdecimalRolled-up cost of the transcription
completed_atdatetimeWhen the transcription finished (success or failure)

The recorded audio is stored as an Active Storage attachment (audio).

Migration Steps​

  1. Run the Add Bot Transcriptions generator, then migrate:
rails generate cm_admin:add_bot_transcriptions
rails db:migrate
note

This applies to every install using Catalyst AI — including fresh installs, which should run add_bot_conversations first and then add_bot_transcriptions.

warning

The migration adds a foreign key to users. If your user class maps to a different table (e.g. admins), edit the generated migration's foreign_key: target before running db:migrate.

  1. Register the new model in config/initializers/zcm_admin.rb:
config.included_models = [..., CtBotConversation, CtBotMessage, CtBotTranscription, CtCostTracking]

New Features​

Voice Input in the Chat Widget​

  • A microphone button in the chat widget records audio and uploads it to CmAdmin::CtBotTranscriptionsController.
  • CtBotTranscriptionJob transcribes the recording, stores the text, status and cost, then broadcasts the result over the signed CmAdmin::CtBotTranscriptionChannel stream.
  • When a message is sent in the same conversation, the transcription is linked to the resulting CtBotMessage.
  • A Catalyst AI Transcriptions index/show page lists each recording with its audio, text, status, Total Cost, and a Cost Trackings tab.

New Platform Setting: CT Bot Transcription Model​

A new CT Bot Transcription Model platform setting (category Catalyst AI) selects the OpenRouter model used for transcription. Leave it blank to use the default (openai/gpt-transcribe). Seed it with CmPlatformSetting.add_cm_default_settings or create it via the Platform Settings page, and restart the app and Sidekiq after changing it.

Checklist​

  1. Run rails generate cm_admin:add_bot_transcriptions && rails db:migrate (adjust the user-table foreign key if needed).
  2. Add CtBotTranscription to config.included_models.
  3. Seed/create the CT Bot Transcription Model platform setting (optional); restart the app and Sidekiq after changing it.