用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/shreed27/DAIN --skill voice命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | voice |
| description | Voice recognition, wake words, and voice-controlled trading |
| emoji | 🎤 |
| gates | {"envs":{"anyOf":["OPENAI_API_KEY","WHISPER_MODEL_PATH"]}} |
Voice-controlled interface with wake word detection, speech-to-text, and text-to-speech.
/voice start Start voice listening
/voice stop Stop voice listening
/voice status Check voice status
/voice wake "hey clodds" Set wake word
/voice language en-US Set language
/voice sensitivity high Wake word sensitivity
/voice timeout 30 Silence timeout (seconds)
/voice continuous on Enable continuous mode
import { createVoiceAssistant } from 'clodds/voice';
const voice = createVoiceAssistant({
// Wake word
wakeWord: 'hey clodds',
wakeWordSensitivity: 0.5, // 0-1
// Speech-to-text
stt: {
provider: 'whisper', // 'whisper' | 'vosk' | 'google'
model: 'base', // 'tiny' | 'base' | 'small' | 'medium' | 'large'
language: 'en',
},
// Text-to-speech
tts: {
provider: 'elevenlabs', // 'elevenlabs' | 'say' | 'espeak'
voice: 'rachel',
speed: 1.0,
},
// Timeouts
silenceTimeoutMs: 3000,
maxRecordingMs: 30000,
});
// Start listening for wake word
await voice.start();
// Check if listening
const isListening = voice.isListening();
// Stop listening
await voice.stop();
// Wake word detected
voice.on('wake', () => {
console.log('Wake word detected!');
});
// Speech recognized
voice.on('speech', (text: string) => {
console.log(`User said: ${text}`);
});
// Transcription complete
voice.on('transcript', (result) => {
console.log(`Final: ${result.text}`);
console.log(`Confidence: ${result.confidence}`);
console.log(`Duration: ${result.durationMs}ms`);
});
// Error handling
voice.on('error', (error) => {
console.error('Voice error:', error);
});
// Silence detected
voice.on('silence', () => {
console.log('User stopped speaking');
});
// Speak text
await voice.speak('Your order has been placed');
// Speak with options
await voice.speak('Market is up 5%', {
voice: 'josh',
speed: 1.2,
pitch: 1.0,
});
// Cancel speaking
voice.cancelSpeech();
// Transcribe audio buffer
const result = await voice.transcribe(audioBuffer, {
language: 'en',
prompt: 'Trading commands', // Context hint
});
console.log(`Text: ${result.text}`);
console.log(`Language: ${result.language}`);
// Check if user is speaking
const vad = voice.getVAD();
vad.on('speechStart', () => {
console.log('User started speaking');
});
vad.on('speechEnd', (audio) => {
console.log('User stopped speaking');
// audio contains the recorded speech
});
| Setting | Values | Description |
|---|---|---|
wakeWord | Any phrase | Trigger phrase |
sensitivity | 0.0 - 1.0 | Detection threshold |
Built-in wake words:
| Provider | Quality | Speed | Offline |
|---|---|---|---|
| Whisper | Excellent | Medium | Yes |
| Vosk | Good | Fast | Yes |
| Excellent | Fast | No |
| Provider | Quality | Voices | API Key |
|---|---|---|---|
| ElevenLabs | Premium | 30+ | Required |
| say (macOS) | Good | System | None |
| espeak | Basic | Many | None |
Once voice is active, speak naturally:
"Hey Clodds, what's my portfolio value?"
"Hey Clodds, buy 100 dollars of Trump YES"
"Hey Clodds, what are the top arbitrage opportunities?"
"Hey Clodds, set a price alert for Bitcoin at 100k"