### Initialize WebSocket for Multi-Channel Audio Source: https://docs.gladia.io/chapters/live-stt/quickstart This example demonstrates initializing a single WebSocket connection for multi-channel audio processing. It involves sending a POST request to the Gladia API to get a WebSocket URL and configuring the connection with the correct number of channels, sample rate, and bit depth. Remember to replace '' with your actual API key. ```typescript // Collect audio buffers from each participant const samiAudio = getSamiAudioBuffer(); const maximeAudio = getMaximeAudioBuffer(); const markAudio = getMarkAudioBuffer(); // Merge into a multi-channel audio // Channel ordering: [0]=Sami, [1]=Maxime, [2]=Mark const channelsData = [samiAudio, maximeAudio, markAudio]; const mergedAudio = interleaveAudio(channelsData, 16); // 16-bit depth // Initialize a single WebSocket session with multi-channel config const response = await fetch("https://api.gladia.io/v2/live", { method: "POST", headers: { "Content-Type": "application/json", "x-gladia-key": "", }, body: JSON.stringify({ encoding: "wav/pcm", sample_rate: 16000, bit_depth: 16, channels: 3, // Specify the number of channels }), }); const { url } = await response.json(); const socket = new WebSocket(url); // Send the merged audio over a single WebSocket ``` -------------------------------- ### Install Gladia SDK for JavaScript Source: https://docs.gladia.io/chapters/pre-recorded-stt/quickstart Install the Gladia SDK for JavaScript using npm. ```sh npm install @gladiaio/sdk ``` -------------------------------- ### Start Session Message Example Source: https://docs.gladia.io/api-reference/v2/live/websocket This message contains information about the start session of the audio chunk. It is emitted once when the session is created and ready. ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:00Z", "type": "start_session" } ``` -------------------------------- ### Install Gladia SDK (Python) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Install the Gladia Python SDK using pip. ```bash pip install gladiaio-sdk ``` -------------------------------- ### Gladia Configuration Example Source: https://docs.gladia.io/chapters/migrations/from-deepgram Example JSON configuration for a Gladia realtime session, demonstrating model, encoding, language, and other settings. ```json { "model": "solaria-1", "encoding": "wav/pcm", "bit_depth": 16, "sample_rate": 16000, "channels": 1, "language_config": { "languages": ["en"], "code_switching": false }, "messages_config": { "receive_partial_transcripts": true, "receive_final_transcripts": true }, "endpointing": 0.8, "maximum_duration_without_endpointing": 30, "realtime_processing": { "custom_vocabulary": false, "custom_spelling": false } } ``` -------------------------------- ### Install Gladia SDK (TypeScript) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Install the Gladia TypeScript SDK using npm. ```bash npm i @gladiaio/sdk ``` -------------------------------- ### Install AssemblyAI SDK (TypeScript) Source: https://docs.gladia.io/chapters/migrations/from-assembly Install the AssemblyAI TypeScript SDK using npm. ```bash npm i assemblyai ``` -------------------------------- ### Install AssemblyAI SDK (Python) Source: https://docs.gladia.io/chapters/migrations/from-assembly Install the AssemblyAI Python SDK using pip. ```bash pip install assemblyai ``` -------------------------------- ### Speech Start Message Example Source: https://docs.gladia.io/api-reference/v2/live/websocket Indicates the start of detected speech activity on a given channel. Includes session ID, timestamp, and channel information. ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:06Z", "type": "speech_start", "data": { "time": 1.24, "channel": 0 } } ``` -------------------------------- ### Start Session Source: https://docs.gladia.io/api-reference/v2/live/websocket Emitted once when the session is created and ready. This message contains the information about the start session of the audio chunk. ```APIDOC ## Start Session ### Description This message contains the information about the start session of the audio chunk. It is emitted once when the session is created and ready. ### Method SEND ### Endpoint N/A (WebSocket Event) ### Parameters #### Payload - **session_id** (string) - Required - UUID identifying the session. - **created_at** (string) - Required - ISO 8601 timestamp in UTC. - **type** (string) - Required - Lifecycle event emitted once when the session is created and ready. ### Request Example ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:00Z", "type": "start_session" } ``` ### Response N/A (This is a message sent by the server) ``` -------------------------------- ### Install Gladia n8n Node via npm Source: https://docs.gladia.io/chapters/integrations/n8n Install the Gladia community node for n8n using npm. This is required for self-hosted n8n instances. ```bash npm install @gladiaio/n8n-nodes ``` -------------------------------- ### Start recording callback Source: https://docs.gladia.io/llms.txt Defines the payload for the callback event `live.start_recording`. ```APIDOC ## POST /v2/live/callback/start-recording ### Description Payload definition for the callback event `live.start_recording`. ### Method POST ### Endpoint /v2/live/callback/start-recording ``` -------------------------------- ### Start recording webhook Source: https://docs.gladia.io/llms.txt Defines the payload for the webhook event `live.start_recording`. ```APIDOC ## POST /v2/live/webhook/start-recording ### Description Payload definition for the webhook event `live.start_recording`. ### Method POST ### Endpoint /v2/live/webhook/start-recording ``` -------------------------------- ### V2 Upload Response Example Source: https://docs.gladia.io/chapters/pre-recorded-stt/migration-from-v1 This is an example of the JSON response you will receive after successfully uploading an audio file using the V2 upload endpoint. It contains the audio_url and metadata needed for subsequent requests. ```json { "audio_url": "https://api.gladia.io/file/636c70f6-92c1-4026-a8b6-0dfe3ecf826f", "audio_metadata": { "id": "636c70f6-92c1-4026-a8b6-0dfe3ecf826f", "filename": "conversation.wav", "extension": "wav", "size": 99515383, "audio_duration": 4146.468542, "number_of_channels": 2 } } ``` -------------------------------- ### Start session callback Source: https://docs.gladia.io/llms.txt Defines the payload for the callback event `live.start_session`. ```APIDOC ## POST /v2/live/callback/start-session ### Description Payload definition for the callback event `live.start_session`. ### Method POST ### Endpoint /v2/live/callback/start-session ``` -------------------------------- ### Example Post-Meeting Analysis Response Source: https://docs.gladia.io/chapters/audio-intelligence/audio-to-llm An example of the structured response received after processing audio with the configured LLM prompts. It includes success status, execution times, and detailed results for each prompt. ```json { "success": true, "is_empty": false, "results": [ { "success": true, "is_empty": false, "results": { "prompt": "Summarize the meeting as bullet points: main topics, decisions, and open questions.", "response": "- **Roadmap Q2**: Team aligned on shipping the billing integration first.\n- **Decision**: Weekly sync moved to Tuesday.\n- **Open question**: Whether to support SSO in v1 is still TBD." }, "exec_time": 1.7726809978485107, "error": null }, { "success": true, "is_empty": false, "results": { "prompt": "Give a concise paragraph summarizing what this meeting was about and the outcome.", "response": "The group reviewed Q2 priorities, agreed to prioritize billing, and rescheduled the standing meeting. SSO scope was left for a follow-up once design signs off." }, "exec_time": 1.5122809978485107, "error": null }, { "success": true, "is_empty": false, "results": { "prompt": "List action items and follow-ups to prepare for the next meeting; include owners if they were mentioned.", "response": "- **Alex**: Finalize SSO requirements doc by Friday.\n- **Jamie**: Share billing API cutover checklist with the team.\n- **Everyone**: Review the updated roadmap draft before next sync." }, "exec_time": 1.8932809978258485, "error": null } ], "exec_time": 6.267103805541992, "error": null } ``` -------------------------------- ### Start session webhook Source: https://docs.gladia.io/llms.txt Defines the payload for the webhook event `live.start_session`. ```APIDOC ## POST /v2/live/webhook/start-session ### Description Payload definition for the webhook event `live.start_session`. ### Method POST ### Endpoint /v2/live/webhook/start-session ``` -------------------------------- ### Initiate Live Session with GladiaClient in Python Source: https://docs.gladia.io/chapters/live-stt/quickstart Initialize the GladiaClient and create a live session configuration object in Python. This prepares the client for real-time audio processing with specified parameters. ```python # Our Python SDK supports sync/threaded and asyncio versions. gladi_client = GladiaClient(api_key="") # sync/threaded version live_client = gladia_client.live_v2() # asyncio version live_client = gladia_client.live_v2_async() init_request = LiveV2InitRequest( model="solaria-1", encoding="wav/pcm", sample_rate=16000, bit_depth=16, channels=1, language_config=LiveV2LanguageConfig(languages=["fr"], code_switching=False), messages_config=LiveV2MessagesConfig(receive_partial_transcripts=True), ) live_session = live_client.start_session(init_request) ``` -------------------------------- ### V2 Full Configuration Sample Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 A comprehensive V2 configuration demonstrating the reorganized parameters for language, preprocessing, and realtime processing. ```json { "encoding": "wav/pcm", "bit_depth": 8, "sample_rate": 48000, "endpointing": 0.8, "maximum_duration_without_endpointing": 10, "language_config": { "languages": ["en"] } "pre_processing": { "audio_enhancer": true }, "realtime_processing": { "words_accurate_timestamps": true } } ``` -------------------------------- ### Example Sentence Segmentation Result Source: https://docs.gladia.io/chapters/pre-recorded-stt/features/sentences The API response will include a 'sentences' key containing segmented results, including sentence text, start and end times, confidence, language, speaker, and channel. ```json "sentences": { "success": true, "is_empty": false, "results": [ { "sentence": "Amy, it says you are trained in technology.", "start": 0.4681999999999999, "end": 2.45525, "words": [...], "confidence": 0.95, "language": "en", "speaker": 0, "channel": 0 } ] } ``` -------------------------------- ### Initialize Gladia Client (Python) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Initialize the Gladia client with your API key in Python. ```python from gladiaio_sdk import GladiaClient gladiaclient = GladiaClient(api_key="") ``` -------------------------------- ### Initiate Live Session with GladiaClient in JavaScript Source: https://docs.gladia.io/chapters/live-stt/quickstart Create a GladiaClient instance and configure a live session with specified audio parameters and language settings. This sets up the client for real-time transcription. ```typescript const gladiaClient = new GladiaClient({ apiKey: , }); const gladiaConfig = { model: "solaria-1", encoding: 'wav/pcm', sample_rate: 16000, bit_depth: 16, channels: 1, language_config: { languages: ["fr"], code_switching: false, }, }; const liveSession = gladiaClient.liveV2().startSession(gladiaConfig); ``` -------------------------------- ### V1 Full Configuration Sample Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 A comprehensive V1 configuration including language, audio enhancement, and timestamp settings. ```json { "encoding": "wav", "bit_depth": 8, "sample_rate": 48000, "model": "accurate", "endpointing": 800, "maximum_audio_duration": 10, "language_behaviour": "manual", "language": "english", "audio_enhancer": true, "word_timestamps": true } ``` -------------------------------- ### Install Deepgram SDK (TypeScript) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Install the Deepgram TypeScript SDK using npm. ```bash npm i @deepgram/sdk ``` -------------------------------- ### Install Deepgram SDK (Python) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Install the Deepgram Python SDK using pip. ```bash pip install deepgram-sdk ``` -------------------------------- ### Make Integration Source: https://docs.gladia.io/llms.txt How to use Gladia with Make. ```APIDOC ## Make Integration ### Description How to use Gladia with Make. ``` -------------------------------- ### Audio Chunk Acknowledgment Example Source: https://docs.gladia.io/api-reference/v2/live/websocket Example of an acknowledgment message for a received audio chunk. It confirms successful reception and buffering by the server. ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:47:00Z", "acknowledged": true, "type": "audio_chunk_ack", "data": { "byte_range": [ 0, 1024 ], "time_range": [ 0.0, 1.024 ] } } ``` -------------------------------- ### Initialize AssemblyAI Client (Python) Source: https://docs.gladia.io/chapters/migrations/from-assembly Initialize the AssemblyAI streaming client with your API key and host. ```python from assemblyai.streaming.v3 import StreamingClient, StreamingClientOptions api_key = "" assemblyClient = StreamingClient( StreamingClientOptions( api_key=api_key, api_host="streaming.assemblyai.com", ) ) ``` -------------------------------- ### Post Summarization Message Example Source: https://docs.gladia.io/api-reference/v2/live/websocket Example of a message containing post-processing abstractive summary of a conversation. This is used after audio processing is complete. ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:47:00Z", "type": "post_summarization", "error": null, "data": { "results": "The team aligned on goals and next steps for the quarter." } } ``` -------------------------------- ### Start Gladia Transcription Session (Python) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Initiates a live transcription session with Gladia using the Python SDK. Ensure the gladia_config is properly set up. ```python gladia_session = gladia_client.live_v2().start_session(gladia_config) ``` -------------------------------- ### V2 Transcription Message Example Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 Example of a final transcription message received from the V2 API. It uses 'type': 'transcript' and 'data.is_final': true for identification. ```json { "type": "transcript", "session_id": "de0a341d-c69f-4e15-a649-7b3f49e211f0", "created_at": "2024-10-10T14:35:28.387Z", "data": { "id": "00_00000000", "is_final": true, "utterance": { "text": " Hello world", "start": 0.188, "end": 1.284, "language": "en", "confidence": 1, "channel": 0, "words": [ { "word": " Hello", "start": 0.188, "end": 0.735, "confidence": 1 }, { "word": " world", "start": 0.736, "end": 1.284, "confidence": 1 } ] } } } ``` -------------------------------- ### Initiate Live STT Session (Python) Source: https://docs.gladia.io/chapters/live-stt/quickstart Initiates a live STT session with specified configurations for messages and callbacks. This is the first step to start transcribing audio in real-time. ```python from gladia import LiveClient # Replace with your actual API key client = LiveClient("YOUR_GLADIA_API_KEY") # Configure messages and callbacks as needed # See API reference for all options config = { "language": "en", "messages_config": { "receive_transcript": True, "receive_partial_transcripts": True }, "callback_config": { "urls": ["YOUR_CALLBACK_URL"] } } # Start the session live_session = client.create_live_session(**config) print(f"Session started. Listening...") ``` -------------------------------- ### V1 Transcription Message Example Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 Example of a final transcription message received from the V1 API. It includes fields like 'event', 'type', and 'transcription'. ```json { "event": "transcript", "request_id": "G-3abade39", "type": "final", "transcription": " Hello world", "time_begin": 1.4376875, "time_end": 2.4696875, "confidence": 0.65, "language": "en", "utterances": [ { "transcription": " Hello world", "time_begin": 1.4376875, "time_end": 2.4696875, "language": "en", "confidence": 0.65, "stable": true, "id": 0 } ], "inference_time": 0.843909502029419, "duration": 2.5845000000000002 } ``` -------------------------------- ### Custom Spelling Example Dictionary Source: https://docs.gladia.io/chapters/audio-intelligence/custom-spelling An example of a custom spelling dictionary where keys are the correct spellings and values are the variants to be replaced. This is used for literal matching. ```json { "Gorish": ["ghorish", "gaurish", "gaureish", "geurish", "go rich"] } ``` -------------------------------- ### Configuration Comparison: Endpointing and Max Duration (V1 vs V2) Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 Illustrates the change in configuration for endpointing and maximum audio duration between V1 and V2. V2 uses seconds for endpointing and a different key for maximum duration. ```json { "endpointing": 800, "maximum_audio_duration": 10 } ``` ```json { "endpointing": 0.8, "maximum_duration_without_endpointing": 10 } ``` -------------------------------- ### Example Custom Metadata Structure Source: https://docs.gladia.io/chapters/audio-intelligence/custom-metadata This JSON structure shows an example of how to format custom metadata. It can include various data types for flexible tagging. ```json { "custom_metadata": { "internalUserId": 2348739875894375, "paymentMethod": { "last4Digits": 4576 }, "internalUserName": "Spencer" } } ``` -------------------------------- ### Initialize Gladia Client (TypeScript) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Initialize the Gladia client with your API key in TypeScript. ```typescript import { GladiaClient } from "@gladiaio/sdk"; const gladiaClient = new GladiaClient({ apiKey: process.env.GLADIA_API_KEY, }); ``` -------------------------------- ### Start Recording Message Schema Source: https://docs.gladia.io/api-reference/v2/live/websocket Defines the structure for messages indicating the start of an audio recording. Includes session ID, creation timestamp, and event type. ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:05Z", "type": "start_recording" } ``` -------------------------------- ### Start Gladia Transcription Session (TypeScript) Source: https://docs.gladia.io/chapters/migrations/from-deepgram Initiates a live transcription session with Gladia using the TypeScript SDK. Ensure the gladiaConfig is properly set up. ```typescript const gladiaSession = gladiaClient.liveV2().startSession(gladiaConfig); ``` -------------------------------- ### Meeting BaaS Integration Source: https://docs.gladia.io/llms.txt How to integrate Gladia with Meeting BaaS. ```APIDOC ## Meeting BaaS Integration ### Description How to integrate Gladia with Meeting BaaS. ``` -------------------------------- ### Initiate WebSocket Connection (V1) Source: https://docs.gladia.io/chapters/live-stt/migration-from-v1 Connect to the V1 WebSocket URL and send configuration. Requires the 'ws' library. ```javascript import WebSocket from 'ws'; const socket = new WebSocket('wss://api.gladia.io/audio/text/audio-transcription'); socket.addEventListener("open", function() { // Send configuration socket.send(JSON.stringify({ 'x_gladia_key': 'YOUR_GLADIA_API_KEY', // ...config properties })) // Start sending audio chunks }); ``` -------------------------------- ### Get Transcription Job Metadata (OpenAPI) Source: https://docs.gladia.io/api-reference/v2/transcription/get This OpenAPI definition outlines the GET request to retrieve transcription job metadata. It specifies the endpoint, parameters, and possible responses, including success (200) and error codes (401, 404). ```yaml openapi: 3.1.0 info: title: Gladia Control API description: '' version: '1.0' contact: {} servers: - url: https://api.gladia.io/ description: Gladia API production URL security: [] tags: [] paths: /v2/transcription/{id}: get: tags: - Transcription V2 summary: Get the transcription job's metadata operationId: TranscriptionController_getTranscript_v2 parameters: - name: id required: true in: path description: Id of the transcription job schema: example: 45463597-20b7-4af7-b3b3-f5fb778203ab type: string responses: '200': description: The transcription job's metadata content: application/json: schema: example: id: 45463597-20b7-4af7-b3b3-f5fb778203ab request_id: G-45463597 version: 2 kind: pre-recorded created_at: '2023-12-28T09:04:17.210Z' status: queued file: id: f0dcZE10-23d8-47f0-a25d-74a6eed88721 filename: split_infinity.wav source: >- http://files.gladia.io/example/audio-transcription/split_infinity.wav audio_duration: 20 number_of_channels: 1 request_params: audio_url: >- http://files.gladia.io/example/audio-transcription/split_infinity.wav subtitles: false diarization: false translation: false summarization: false sentences: false moderation: false named_entity_recognition: false name_consistency: false custom_spelling: false structured_data_extraction: false chapterization: false sentiment_analysis: false display_mode: false audio_enhancer: false language_config: code_switching: false languages: - fr - en accurate_words_timestamps: false diarization_enhanced: false punctuation_enhanced: false completed_at: null custom_metadata: null error_code: null result: null oneOf: - $ref: '#/components/schemas/PreRecordedResponse' - $ref: '#/components/schemas/StreamingResponse' discriminator: propertyName: kind mapping: pre-recorded: '#/components/schemas/PreRecordedResponse' live: '#/components/schemas/StreamingResponse' '401': description: You don't have the permissions to access the transcription job content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' '404': description: The transcription job doesn't exist or has been deleted content: application/json: schema: $ref: '#/components/schemas/NotFoundErrorResponse' security: - x_gladia_key: [] components: schemas: PreRecordedResponse: type: object properties: id: type: string description: Id of the job format: uuid example: 45463597-20b7-4af7-b3b3-f5fb778203ab request_id: type: string description: Debug id example: G-45463597 version: type: integer description: API version example: 2 status: type: string description: >- "queued": the job has been queued. "processing": the job is being processed. "done": the job has been processed and the result is available. "error": an error occurred during the job's processing. enum: - queued - processing - done - error created_at: type: string description: Creation date format: date-time example: '2023-12-28T09:04:17.210Z' completed_at: type: string description: Completion date when status is "done" or "error" format: date-time example: '2023-12-28T09:04:37.210Z' nullable: true custom_metadata: type: object description: Custom metadata given in the initial request example: ``` -------------------------------- ### Get Pre-recorded Audio Translation Result Source: https://docs.gladia.io/api-reference/v2/pre-recorded/get Retrieves the translation and transcription results for a pre-recorded audio file. This endpoint is useful for getting a comprehensive analysis of the audio content, including full transcripts, detected languages, and sentence-level details. ```APIDOC ## GET /v2/pre-recorded/get ### Description Retrieves the translation and transcription results for a pre-recorded audio file. ### Method GET ### Endpoint /v2/pre-recorded/get ### Parameters #### Query Parameters - **id** (string) - Required - The unique identifier of the pre-recorded audio job. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the pre-recorded audio job. - **status** (string) - The current status of the job (e.g., `processing`, `completed`, `failed`). - **type** (string) - The type of the audio intelligence task performed (e.g., `translation`, `transcription`). - **results** (object) - Contains the detailed results of the audio processing. - **TranslationResultDTO** (object) - Object containing translation-specific results. - **error** (AddonErrorDTO) - Contains error details if the translation failed. - **full_transcript** (string) - The complete transcription of the audio in text format. - **languages** (array) - An array of detected language codes, sorted by detection frequency. - **sentences** (array) - An array of sentence-level transcription and translation data, if enabled. - **subtitles** (array) - An array of subtitle data, if enabled. - **utterances** (array) - An array of transcribed speech utterances. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "status": "completed", "type": "translation", "results": { "TranslationResultDTO": { "error": null, "full_transcript": "Hello, this is a test transcript.", "languages": ["en"], "sentences": [ { "start": 0.5, "end": 3.2, "text": "Hello, this is a test transcript.", "translation": "Bonjour, ceci est une transcription de test." } ], "subtitles": [ { "start": 0.5, "end": 3.2, "text": "Hello, this is a test transcript." } ], "utterances": [ { "start": 0.5, "end": 3.2, "text": "Hello, this is a test transcript." } ] } } } ``` ``` -------------------------------- ### Sentiment Analysis Message Source: https://docs.gladia.io/api-reference/v2/live/websocket This message provides detailed information about the sentiment and emotion analysis of an utterance. It includes the original utterance text, start and end times, and a list of results, each containing sentiment, emotion, text, start, end, and channel information. ```APIDOC ## Sentiment Analysis Message ### Description This message contains the informations about the sentiment analysis of the audio chunk. ### Payload Schema ```json { "session_id": "string", "created_at": "string", "type": "sentiment_analysis", "error": null | object, "data": { "utterance_id": "string", "utterance": { "text": "string", "start": "number", "end": "number" }, "results": [ { "sentiment": "string", "emotion": "string", "text": "string", "start": "number", "end": "number", "channel": "integer" } ] } } ``` ### Example ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:35Z", "type": "sentiment_analysis", "error": null, "data": { "utterance_id": "utt_003", "utterance": { "text": "I love this product!", "start": 11, "end": 13.2 }, "results": [ { "sentiment": "positive", "emotion": "joy", "text": "love this product", "start": 11.4, "end": 12.9, "channel": 0 } ] } } ``` ``` -------------------------------- ### SpeechStartMessage Source: https://docs.gladia.io/api-reference/v2/live/websocket Indicates the start of detected speech activity on a given channel. ```APIDOC ## SpeechStartMessage ### Description Indicates the start of detected speech activity on a given channel. ### Method SEND ### Message Type speech_start ### Payload - **session_id** (string) - UUID identifying the session. - **created_at** (string) - ISO 8601 timestamp in UTC. - **type** (string) - Must be "speech_start". - **data** (object) - Timing information for speech start/end events. - **time** (number) - Time in seconds from session start when the event occurred. - **channel** (integer) - Audio channel index (0-based) for which the event applies. ### Example ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-09-19T12:34:06Z", "type": "speech_start", "data": { "time": 1.24, "channel": 0 } } ``` ```