Implementing voice capabilities in your clinical workflow
Convert clinical conversations into structured SOAP notes with medical-grade accuracy.
Control SynThera hands-free with voice commands for sterile environments.
Convert clinical insights and reports into natural-sounding speech.
High-quality microphone input with noise cancellation
Whisper-based medical ASR with clinical NLP
Structured SOAP notes and clinical insights
Get voice capabilities up and running in your application in minutes with our SDKs.
// Install SynThera Voice SDK npm install @synthera/voice-sdk // Initialize the voice client import { VoiceClient } from '@synthera/voice-sdk'; const voiceClient = new VoiceClient({ apiKey: 'your-api-key', endpoint: 'https://api.synthera.health', features: { speechToText: true, voiceCommands: true, textToSpeech: true } }); // Start voice transcription const startTranscription = async () => { try { const session = await voiceClient.startTranscription({ language: 'en-US', specialty: 'internal-medicine', realTime: true, onTranscript: (transcript) => { console.log('Transcript:', transcript.text); // Update your UI with the transcript setTranscript(transcript.text); }, onStructured: (structured) => { console.log('SOAP Note:', structured); // Process structured clinical data updateSOAPNote(structured); } }); return session; } catch (error) { console.error('Transcription failed:', error); } }; // Voice command handling voiceClient.onCommand((command) => { switch (command.intent) { case 'navigate_to_patient': navigateToPatient(command.entities.patientId); break; case 'order_medication': orderMedication(command.entities.medication); break; case 'query_lab_results': queryLabResults(command.entities.testType); break; } }); // React component example function ClinicalVoiceInterface() { const [isListening, setIsListening] = useState(false); const [transcript, setTranscript] = useState(''); const [soapNote, setSoapNote] = useState(null); const toggleListening = async () => { if (isListening) { await voiceClient.stopTranscription(); setIsListening(false); } else { await startTranscription(); setIsListening(true); } }; return ( <div className="voice-interface"> <button onClick={toggleListening} className={isListening ? 'listening' : 'idle'} > {isListening ? 'Stop Listening' : 'Start Voice Transcription'} </button> <div className="transcript"> <h3>Live Transcript</h3> <p>{transcript}</p> </div> {soapNote && ( <div className="soap-note"> <h3>Generated SOAP Note</h3> <div> <h4>Subjective:</h4> <p>{soapNote.subjective}</p> <h4>Objective:</h4> <p>{soapNote.objective}</p> <h4>Assessment:</h4> <p>{soapNote.assessment}</p> <h4>Plan:</h4> <p>{soapNote.plan}</p> </div> </div> )} </div> ); }
# Install SynThera Voice SDK pip install synthera-voice-sdk # Python implementation from synthera.voice import VoiceClient import asyncio class ClinicalVoiceAssistant: def __init__(self, api_key, specialty='general'): self.client = VoiceClient( api_key=api_key, endpoint='https://api.synthera.health', specialty=specialty ) async def start_transcription_session(self): """Start a voice transcription session""" session = await self.client.create_session( language='en-US', real_time=True, noise_suppression=True, medical_vocabulary=True ) # Set up event handlers session.on('transcript', self.handle_transcript) session.on('structured_data', self.handle_structured_data) session.on('command', self.handle_voice_command) await session.start() return session def handle_transcript(self, transcript): """Handle real-time transcript updates""" print(f"Transcript: {transcript['text']}") print(f"Confidence: {transcript['confidence']}") # Process medical entities if 'entities' in transcript: for entity in transcript['entities']: print(f"Entity: {entity['text']} -> {entity['type']}") def handle_structured_data(self, structured): """Handle structured clinical data""" soap_note = structured.get('soap_note', {}) if soap_note: print("Generated SOAP Note:") print(f"S: {soap_note.get('subjective', '')}") print(f"O: {soap_note.get('objective', '')}") print(f"A: {soap_note.get('assessment', '')}") print(f"P: {soap_note.get('plan', '')}") # Extract clinical codes codes = structured.get('clinical_codes', []) for code in codes: print(f"Code: {code['code']} ({code['system']}) - {code['description']}") def handle_voice_command(self, command): """Handle voice commands""" intent = command['intent'] entities = command.get('entities', {}) if intent == 'navigate_patient': patient_id = entities.get('patient_id') print(f"Navigating to patient: {patient_id}") elif intent == 'order_medication': medication = entities.get('medication') dosage = entities.get('dosage') print(f"Ordering medication: {medication} {dosage}") elif intent == 'query_labs': test_type = entities.get('test_type') patient = entities.get('patient') print(f"Querying {test_type} for {patient}") # Usage example async def main(): assistant = ClinicalVoiceAssistant( api_key='your-api-key', specialty='cardiology' ) session = await assistant.start_transcription_session() # Keep the session running try: while True: await asyncio.sleep(1) except KeyboardInterrupt: await session.stop() print("Session ended") if __name__ == "__main__": asyncio.run(main())
// Audio input configuration const audioConfig = { // Microphone settings sampleRate: 16000, // 16kHz for optimal ASR performance channels: 1, // Mono audio bitDepth: 16, // 16-bit depth // Noise suppression noiseSuppression: { enabled: true, aggressiveness: 'high', // 'low', 'medium', 'high' adaptiveFilter: true // Adapt to environment noise }, // Echo cancellation echoCancellation: { enabled: true, mode: 'medical' // Optimized for clinical environments }, // Automatic gain control autoGainControl: { enabled: true, targetLevel: -18, // dBFS target level compressionGain: 6 // dB compression }, // Voice activity detection vad: { enabled: true, sensitivity: 0.7, // 0.0 to 1.0 timeout: 3000 // 3 seconds silence timeout } }; // Language and model configuration const languageConfig = { primary: 'en-US', fallback: ['en-GB', 'en-AU'], // Medical specialty models specialty: 'cardiology', // or 'internal-medicine', 'surgery', etc. // Custom vocabulary customVocabulary: [ 'synthera', 'echocardiogram', 'troponin', 'beta-blocker' ], // Pronunciation hints pronunciationHints: { 'warfarin': 'WAR-far-in', 'acetaminophen': 'uh-see-tuh-MIN-uh-fen' } };
// Clinical NLP configuration const clinicalConfig = { // SOAP note generation soapGeneration: { enabled: true, autoStructure: true, includeAssessment: true, includePlan: true, confidenceThreshold: 0.85 }, // Medical entity extraction entityExtraction: { medications: true, conditions: true, procedures: true, anatomy: true, dosages: true, timeExpressions: true }, // Clinical coding clinicalCoding: { icd10: true, snomed: true, cpt: true, rxnorm: true, loinc: true }, // Negation and uncertainty detection contextualAnalysis: { negation: true, // "No chest pain" uncertainty: true, // "Possible pneumonia" temporality: true, // "Previous MI" experiencer: true // "Family history of diabetes" }, // Quality assurance qualityChecks: { spellCheck: true, medicalValidation: true, consistencyCheck: true, completenessCheck: true } }; // Real-time processing options const streamingConfig = { // Transcription streaming streaming: { enabled: true, chunkSize: 1000, // milliseconds interimResults: true, punctuation: true, capitalization: true }, // Structured data streaming structuredStreaming: { enabled: true, entityUpdates: true, soapUpdates: true, codeUpdates: true }, // Performance settings performance: { lowLatency: true, // Prioritize speed over accuracy batchProcessing: false, // Process in real-time cacheResults: true // Cache for faster subsequent processing } };
All voice commands must start with the wake word: "Hey SynThera"
"Hey SynThera, open patient John Smith"
Navigate to specific patient record
"Hey SynThera, show lab results"
Display recent laboratory results
"Hey SynThera, go to imaging"
Navigate to imaging module
"Hey SynThera, show medication list"
Display current medications
"Hey SynThera, open new note"
Start new clinical documentation
"Hey SynThera, order CBC with diff"
Place laboratory order
"Hey SynThera, prescribe lisinopril 10mg daily"
Add medication to prescription
"Hey SynThera, schedule follow-up in two weeks"
Create appointment reminder
"Hey SynThera, add allergy to penicillin"
Update allergy information
"Hey SynThera, search for hypertension guidelines"
Access clinical decision support
"Hey SynThera, start dictation"
Begin voice-to-text transcription
"Hey SynThera, new paragraph"
Format dictation with paragraph break
"Hey SynThera, correct that to hypertension"
Make corrections to transcription
"Hey SynThera, save and sign note"
Complete documentation
"Hey SynThera, generate assessment and plan"
AI-assisted clinical reasoning
"Hey SynThera, what's my schedule today?"
Query daily appointments
"Hey SynThera, show me urgent tasks"
Display priority action items
"Hey SynThera, read latest lab result"
Text-to-speech for hands-free review
"Hey SynThera, set timer for 15 minutes"
Clinical timer management
"Hey SynThera, help with voice commands"
Display command reference
All voice data is processed with enterprise-grade security and full HIPAA compliance.
End-to-End Encryption
AES-256 encryption for all voice data in transit and at rest
Zero-Knowledge Processing
Voice processing without persistent storage of PHI
Local Processing Options
On-device processing for maximum privacy
Audit Logging
Complete audit trail for all voice interactions
Voice Biometric Authentication
Verify clinician identity through voice patterns
Selective Recording
Choose which conversations to transcribe
Automatic Data Purging
Configurable retention policies for voice data
Privacy Mode
Disable voice features in sensitive conversations
// Security configuration const securityConfig = { // Encryption settings encryption: { algorithm: 'AES-256-GCM', keyRotation: '24h', tlsVersion: '1.3' }, // Authentication authentication: { voiceBiometrics: true, multiFactorAuth: true, sessionTimeout: 3600, // 1 hour maxFailedAttempts: 3 }, // Data retention dataRetention: { voiceData: '0h', // Immediate deletion transcripts: '7d', // 7 days structuredData: '7y', // 7 years (compliance) auditLogs: '10y' // 10 years }, // Privacy controls privacy: { allowRecording: true, patientConsentRequired: true, anonymizeTranscripts: false, localProcessingOnly: false }, // Compliance settings compliance: { hipaa: true, gdpr: true, auditTrail: true, accessLogging: true } };
Voice transcription not starting or no audio input detected.
// Check microphone permissions navigator.mediaDevices.getUserMedia({ audio: true }) .then(stream => console.log('Microphone access granted')) .catch(err => console.error('Microphone access denied:', err)); // List available audio devices navigator.mediaDevices.enumerateDevices() .then(devices => { const audioInputs = devices.filter(d => d.kind === 'audioinput'); console.log('Available microphones:', audioInputs); });
Transcripts contain errors or miss medical terminology.
// Optimize audio quality const audioConfig = { sampleRate: 16000, noiseSuppression: { enabled: true, aggressiveness: 'high' }, echoCancellation: { enabled: true }, autoGainControl: { enabled: true } }; // Use specialty-specific models const voiceClient = new VoiceClient({ specialty: 'cardiology', // Improves medical term recognition customVocabulary: ['custom', 'medical', 'terms'], confidenceThreshold: 0.8 });
Voice commands are transcribed but not executed.
// Debug command recognition voiceClient.onCommand((command) => { console.log('Command recognized:', command); console.log('Intent:', command.intent); console.log('Entities:', command.entities); console.log('Confidence:', command.confidence); }); // Enable command debugging voiceClient.enableDebug({ commandRecognition: true, intentClassification: true, entityExtraction: true });
// Performance monitoring const performanceMonitor = { // Track transcription latency trackLatency: () => { const startTime = performance.now(); voiceClient.onTranscript(() => { const latency = performance.now() - startTime; console.log(`Transcription latency: ${latency}ms`); }); }, // Monitor audio quality trackAudioQuality: () => { voiceClient.onAudioQuality((quality) => { console.log('Audio quality metrics:', { snr: quality.signalToNoise, volume: quality.averageVolume, clarity: quality.clarityScore }); }); }, // Resource usage trackResources: () => { setInterval(() => { console.log('Memory usage:', performance.memory); console.log('CPU usage:', navigator.hardwareConcurrency); }, 5000); } }; // Optimization settings const optimizedConfig = { // Reduce processing overhead streaming: { chunkSize: 2000, // Larger chunks for less frequent processing interimResults: false // Disable interim results for better performance }, // Batch processing for non-real-time scenarios batchProcessing: { enabled: true, batchSize: 10, // Process 10 audio chunks together processingInterval: 1000 // Process every second }, // Model optimization models: { useQuantized: true, // Use smaller, faster models cacheEnabled: true, // Cache model predictions prioritizeSpeed: true // Speed over accuracy for real-time use } };