Voice Enhancement

The voice enhancement service uses AI to clean up and improve voice transcripts.

Enhance transcript

POST /api/voice/enhance

Enhance a voice transcript using the configured LLM provider.

FieldTypeRequiredDescription
transcriptstringYesRaw transcript text
languagestringNoLanguage code (default: zh-CN)
options.enableSelfCorrectionbooleanNoEnable auto-correction
options.enableListFormattingbooleanNoFormat lists
options.enableFillerRemovalbooleanNoRemove filler words
options.enableToneAdjustmentbooleanNoAdjust tone
options.targetTonestringNoTarget tone: formal/casual/professional
const result = await client.enhanceVoice({
  transcript: 'Um, so I think we should, like, deploy tomorrow maybe...',
  language: 'en-US',
  options: {
    enableSelfCorrection: true,
    enableFillerRemoval: true,
  },
})
shadowob voice-enhance enhance \
  --transcript "Um, so I think we should, like, deploy tomorrow..." \
  --language en-US \
  --no-filler-removal \
  --json

Enhance transcript (query params)

GET /api/voice/enhance?transcript=...&language=en-US

Same as the POST version, but uses query parameters.

ParamTypeRequiredDescription
transcriptstringYesRaw transcript text
languagestringNoLanguage code
enableSelfCorrectionbooleanNoAuto-correction
enableListFormattingbooleanNoList formatting
enableFillerRemovalbooleanNoFiller word removal
enableToneAdjustmentbooleanNoTone adjustment
targetTonestringNoformal/casual/professional
const result = await client.enhanceVoiceQuery({
  transcript: 'Hello world',
  language: 'en-US',
  enableFillerRemoval: true,
})

Get voice config

GET /api/voice/config

Returns the current voice enhancement configuration (API key redacted).

const config = await client.getVoiceConfig()
shadowob voice-enhance config --json

Update voice config

POST /api/voice/config

Admin only. Update the LLM configuration for voice enhancement.

FieldTypeRequiredDescription
providerstringYesopenai / anthropic / alibaba / custom
apiKeystringYesProvider API key
baseUrlstringNoCustom base URL
modelstringNoModel name
temperaturenumberNo0-2
maxTokensnumberNoMax response tokens
timeoutnumberNoRequest timeout (ms)
enabledbooleanNoEnable/disable service
await client.updateVoiceConfig({
  provider: 'openai',
  apiKey: 'sk-...',
  model: 'gpt-4',
  enabled: true,
})

Health check

GET /api/voice/health

Admin only. Checks if the voice enhancement service is configured and operational.

const health = await client.voiceHealthCheck()