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:
| Column | Type | Purpose |
|---|---|---|
user_id | reference (FK, not null) | The user who recorded the audio |
ct_bot_conversation_id | reference (FK) | The open conversation at recording time, if any |
ct_bot_message_id | reference (FK) | The message the transcription was sent with, once linked |
request_id | string | Client request ID used to route the result to the right widget |
status | integer (enum) | pending, success, failed |
text | text | The transcribed text |
error_message | string | Failure reason, if any |
total_cost_cents | decimal | Rolled-up cost of the transcription |
completed_at | datetime | When the transcription finished (success or failure) |
The recorded audio is stored as an Active Storage attachment (audio).
Migration Steps
- Run the Add Bot Transcriptions generator, then migrate:
rails generate cm_admin:add_bot_transcriptions
rails db:migrate
This applies to every install using Catalyst AI — including fresh installs, which should run add_bot_conversations first and then add_bot_transcriptions.
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.
- 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. CtBotTranscriptionJobtranscribes the recording, stores the text, status and cost, then broadcasts the result over the signedCmAdmin::CtBotTranscriptionChannelstream.- 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
- Run
rails generate cm_admin:add_bot_transcriptions && rails db:migrate(adjust the user-table foreign key if needed). - Add
CtBotTranscriptiontoconfig.included_models. - Seed/create the CT Bot Transcription Model platform setting (optional); restart the app and Sidekiq after changing it.