A complete implementation of the Houndify JavaScript SDK with both client-side and server-side components for voice and text queries. This project uses the official Houndify SDK structure with proper authentication and WebSocket-based voice processing.
π For detailed SDK information, examples, and implementation guidance, see: docs/houndify-javascript-sdk.md
This comprehensive documentation covers:
- Installation and setup methods
- Complete API reference
- Text and voice request implementation
- Audio recording and conversation state management
- Troubleshooting and best practices
- Server-side authentication and proxying
c:/Projects/Houndify-Voice-Agent/
βββ .gitattributes
βββ LICENSE
βββ package.json # Project dependencies and scripts
βββ README.md # This file
βββ src/ # Source code
β βββ server/ # Server-side Node.js code
β β βββ server.js # Main Express server
β β βββ routes/ # API routes
β β β βββ houndify.js # Official Houndify SDK handlers
β β βββ config/ # Configuration files
β β βββ houndify-config.js # Houndify API configuration
βββ public/ # Client-side files served by server
β βββ index.html # Main HTML interface (includes Houndify SDK)
β βββ js/ # Client-side JavaScript
β β βββ main.js # Official SDK implementation
β βββ css/ # Stylesheets
β βββ styles.css # Application styles
βββ node_modules/ # Dependencies (auto-generated)
βββ docs/ # Documentation
βββ houndify-javascript-sdk.md # Complete SDK documentation
The Houndify SDK and required dependencies are already installed via npm:
npm installπ For detailed installation options and setup methods, see: docs/houndify-javascript-sdk.md#installation
You need to create a .env file with your Houndify credentials:
# Copy the example environment file
cp .env.example .env
# Edit .env and add your Houndify credentials
# Get your credentials from https://www.houndify.com/dashboardRequired Environment Variables:
HOUNDIFY_CLIENT_ID=your_client_id_here
HOUNDIFY_CLIENT_KEY=your_client_key_hereNote: Never commit your .env file to version control. The .gitignore file is configured to exclude it.
π For complete authentication setup and security guidelines, see: docs/houndify-javascript-sdk.md#browser-sdk-setup
# Start the server
npm start
# For development with auto-restart (requires nodemon)
npm run devThe application will be available at http://localhost:3000
- Open your browser to
http://localhost:3000 - Type your question in the text input field
- Click "Send" or press Enter
- View the response from Houndify with conversation context
π For complete TextRequest implementation details, see: docs/houndify-javascript-sdk.md#text-requests
- Click the "Click to speak" button
- Allow microphone access when prompted
- Speak your question (partial transcripts shown in real-time)
- Click the button again to stop recording
- View the processed response from Houndify
π For complete VoiceRequest and AudioRecorder implementation, see: docs/houndify-javascript-sdk.md#voice-requests
GET /houndifyAuth- Official authentication handlerPOST /textSearchProxy- Official text query proxyPOST /api/houndify/voice- Voice query information endpointGET /health- Health check endpoint
- β Text Queries: Official SDK TextRequest implementation
- β Voice Queries: Official SDK VoiceRequest with AudioRecorder
- β Real-time Transcription: Partial transcripts during voice recording
- β Conversation State: Context-aware follow-up questions
- β Modern UI: Clean, responsive interface with loading states
- β Error Handling: Comprehensive error handling and user feedback
- β Security: Server-side API key management with official handlers
- β WebSocket Support: Real-time voice processing via WebSocket
This project uses the official Houndify JavaScript SDK (v3.1.13) with:
- TextRequest: Official text query handling with proxy authentication
- VoiceRequest: WebSocket-based voice processing with real-time transcription
- AudioRecorder: Browser audio capture with proper event handling
- HoundifyExpress: Server-side authentication and proxy handlers
π For complete API overview and all constructors, see: docs/houndify-javascript-sdk.md#api-overview
- Client requests authentication token from
/houndifyAuth - Server signs token with client key using official handler
- Client uses signed token for API requests
- Text queries go through
/textSearchProxyfor secure processing
π For detailed authentication implementation, see: docs/houndify-javascript-sdk.md#setting-up-your-server-for-browser-requests
- AudioRecorder captures microphone input
- VoiceRequest establishes WebSocket connection
- Audio streams in real-time with partial transcripts
- Final response includes conversation state for context
π For complete audio recording implementation, see: docs/houndify-javascript-sdk.md#recording-audio-in-the-browser
The application maintains conversation context across queries for natural follow-up questions.
π For conversation state implementation details, see: docs/houndify-javascript-sdk.md#managing-conversation-state
- API Keys: Client key is securely stored server-side only
- Authentication: Uses official Houndify authentication handlers
- CORS: Configured for local development (adjust for production)
- HTTPS: Required for microphone access in production
- Server-side:
src/server/- Official SDK handlers and Express server - Client-side:
public/- Official SDK integration with modern UI - Configuration:
src/server/config/- API credentials and settings - Documentation:
docs/- Complete SDK documentation
src/server/server.js- Express server with official endpointssrc/server/routes/houndify.js- Official HoundifyExpress handlerspublic/js/main.js- Official SDK TextRequest/VoiceRequest implementationsrc/server/config/houndify-config.js- Pre-configured API credentialspublic/index.html- Includes official SDK via CDN
- Server-side: Use official HoundifyExpress handlers in
src/server/routes/ - Client-side: Extend with official SDK constructors in
public/js/main.js - Styling: Update
public/css/styles.css
- Authentication Errors: Check server logs for authentication handler issues
- Microphone Access: Ensure HTTPS in production, HTTP works on localhost
- WebSocket Errors: Check browser console for VoiceRequest connection issues
- Port Conflicts: If port 3000 is in use, set
PORTenvironment variable
π For comprehensive troubleshooting guide, see: docs/houndify-javascript-sdk.md#troubleshooting
Enable SDK debug mode in client-side code:
Houndify.setDebug(true);- Text Queries: Try "What's the weather?" or "What time is it?"
- Voice Queries: Test with clear speech and good microphone
- Conversation: Ask follow-up questions to test context awareness
π For best practices and performance optimization, see: docs/houndify-javascript-sdk.md#best-practices
This project is licensed under the ISC License - see the LICENSE file for details.
- Houndify JavaScript SDK Documentation - Complete SDK reference, examples, and implementation guide