Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Sign In

@jutech-devs/voice-agent-sdk

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jutech-devs/voice-agent-sdk

Professional Voice Agent SDK that integrates with @jutech-devs/agent-sdk

latest
npmnpm
Version
1.0.34
Version published
Maintainers
1
Created
Source

@jutech-devs/voice-agent-sdk

Professional Voice Agent SDK that integrates seamlessly with @jutech-devs/agent-sdk.

Features

  • 🎤 Voice-to-Text: Web Speech API integration
  • 🔊 Text-to-Speech: Natural voice responses
  • 🎯 Agent Integration: Works with existing chat agents
  • 📱 Responsive UI: Beautiful voice interface
  • 🎨 Customizable: Themes, colors, and positioning
  • 🔄 Real-time: Live transcription and responses

Installation

npm install @jutech-devs/voice-agent-sdk

Quick Start

React Component

import { VoiceWidget } from '@jutech-devs/voice-agent-sdk'

function App() {
  return (
    <VoiceWidget
      apiKey="your-api-key"
      agentId="your-agent-id"
      baseUrl="https://your-server.com"
      user={{
        id: "user123",
        name: "John Doe",
        email: "john@example.com"
      }}
      primaryColor="#3b82f6"
      position="bottom-right"
      theme="light"
      title="Voice Assistant"
      subtitle="Click to start talking"
    />
  )
}

JavaScript Class

import { VoiceAgent } from '@jutech-devs/voice-agent-sdk'

const voiceAgent = new VoiceAgent('your-api-key', {
  agentId: 'your-agent-id',
  baseUrl: 'https://your-server.com',
  user: {
    id: 'user123',
    name: 'John Doe',
    email: 'john@example.com'
  }
})

// Event listeners
voiceAgent.on('onConnect', () => {
  console.log('Connected to voice agent')
})

voiceAgent.on('onTranscript', (text, isFinal) => {
  console.log('Transcript:', text, 'Final:', isFinal)
})

voiceAgent.on('onResponse', (text) => {
  console.log('Agent response:', text)
})

// Connect and start
await voiceAgent.connect()
await voiceAgent.startRecording()

API Reference

VoiceWidget Props

PropTypeRequiredDefaultDescription
apiKeystring-Your agent API key
agentIdstring-Agent ID to connect to
baseUrlstringhttp://localhost:3001Server base URL
userobject-User information
primaryColorstring#3b82f6Primary theme color
positionstringbottom-rightWidget position
themestringlightUI theme
titlestringVoice AssistantWidget title
subtitlestringClick to start talkingWidget subtitle
autoStartbooleanfalseAuto-connect on mount
showTranscriptbooleantrueShow transcription
languagestringenSpeech recognition language

VoiceAgent Methods

MethodDescription
connect()Connect to the agent
disconnect()Disconnect from agent
startRecording()Start voice recording
stopRecording()Stop voice recording
sendText(text)Send text message
mute()Mute microphone
unmute()Unmute microphone
on(event, callback)Add event listener

Events

EventParametersDescription
onConnect-Connected to agent
onDisconnect-Disconnected from agent
onTranscripttext, isFinalSpeech transcription
onResponsetextAgent response
onErrorerrorError occurred

Integration with Agent SDK

This voice SDK works seamlessly with the regular @jutech-devs/agent-sdk:

import { AgentWidget } from '@jutech-devs/agent-sdk'
import { VoiceWidget } from '@jutech-devs/voice-agent-sdk'

function App() {
  const [showVoice, setShowVoice] = useState(false)
  
  return (
    <div>
      {/* Regular chat widget */}
      <AgentWidget
        apiKey="your-api-key"
        agentId="your-agent-id"
      />
      
      {/* Voice widget for same agent */}
      <VoiceWidget
        apiKey="your-api-key"
        agentId="your-agent-id"
        position="bottom-left"
      />
    </div>
  )
}

Styling

The voice widget includes beautiful default styles with CSS custom properties for easy customization:

.voice-widget {
  --vw-primary-color: #3b82f6;
  --vw-primary-hover: #2563eb;
}

Browser Support

  • Chrome/Edge: Full support
  • Firefox: Full support
  • Safari: Full support
  • Mobile: iOS Safari, Chrome Mobile

License

MIT © JuTech Devs

Keywords

ai

FAQs

Package last updated on 13 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts