> ## Documentation Index
> Fetch the complete documentation index at: https://docs.navtalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fitness Trainer & Tech Support

> Use Owen to provide fitness coaching and technical support expertise

![Owen - Fitness Trainer & Tech Support](https://navtalk.s3.us-east-2.amazonaws.com/uploadFiles/navtalk.Owen.png)

## Overview

The **Fitness Trainer & Tech Support** use case uses **Owen** to provide dual expertise in both fitness coaching and technical support. This versatile digital assistant can guide users through workout routines, provide fitness advice, and also assist with technical issues when needed.

## Use Case Benefits

* **Dual Expertise**: Combine fitness guidance with technical support in one interface
* **Personalized Workouts**: Create custom workout plans based on user goals and fitness level
* **24/7 Availability**: Get fitness guidance or tech support anytime
* **Consistent Quality**: Ensure all users receive expert-level guidance

## Implementation

<CodeGroup>
  ```javascript JavaScript theme={null}
  const NavTalkMessageType = Object.freeze({
      CONNECTED_SUCCESS: "conversation.connected.success",
      REALTIME_SESSION_CREATED: "realtime.session.created",
      REALTIME_SESSION_UPDATED: "realtime.session.updated",
      // ... other event types
  });

  const websocketUrl = 'wss://transfer.navtalk.ai/wss/v2/realtime-chat';
  const license = 'your-license-key';
  const characterName = 'navtalk.Owen';

  const websocketUrlWithParams = `${websocketUrl}?license=${encodeURIComponent(license)}&name=${encodeURIComponent(characterName)}`;
  const socket = new WebSocket(websocketUrlWithParams);

  // Configure Owen as fitness trainer and tech support
  socket.onmessage = (event) => {
    if (typeof event.data === 'string') {
      const data = JSON.parse(event.data);
      const nav_data = data.data;
      
      if (data.type === NavTalkMessageType.REALTIME_SESSION_CREATED) {
        // Send conversation history if needed
        // Session configuration (instructions, voice, model) is sent via realtime.input_config
      }
      
      if (data.type === NavTalkMessageType.REALTIME_SESSION_UPDATED) {
        // Session ready, start sending audio input
      }
    }
  };
  ```

  ```python Python theme={null}
  import asyncio
  import websockets
  import json
  from urllib.parse import quote

  NAV_TALK_MESSAGE_TYPE = {
      'CONNECTED_SUCCESS': 'conversation.connected.success',
      'REALTIME_SESSION_CREATED': 'realtime.session.created',
      'REALTIME_SESSION_UPDATED': 'realtime.session.updated',
      # ... other event types
  }

  async def connect_fitness_tech_support():
      websocket_url = 'wss://transfer.navtalk.ai/wss/v2/realtime-chat'
      license = 'your-license-key'
      character_name = 'navtalk.Owen'
      
      websocket_url_with_params = f'{websocket_url}?license={quote(license)}&name={quote(character_name)}'
      
      async with websockets.connect(websocket_url_with_params) as websocket:
          async for message in websocket:
              if isinstance(message, str):
                  data = json.loads(message)
                  nav_data = data.get('data')
                  
                  if data.get('type') == NAV_TALK_MESSAGE_TYPE['REALTIME_SESSION_CREATED']:
                      # Send conversation history if needed
                      # Session configuration (instructions, voice, model) is sent via realtime.input_config
                      pass
                  
                  if data.get('type') == NAV_TALK_MESSAGE_TYPE['REALTIME_SESSION_UPDATED']:
                      # Session ready, start sending audio input
                      pass

  asyncio.run(connect_fitness_tech_support())
  ```
</CodeGroup>

<Note>
  Use function calling to integrate with fitness tracking apps or technical knowledge bases for more specialized assistance.
</Note>
