environment-setup-guide
Guide developers through setting up development environments with proper tools, dependencies, and configurations
speak-core-workflow-b
Execute Speak secondary workflow: Pronunciation Training with detailed phoneme analysis. Use when implementing pronunciation drills, speech scoring, or targeted pronunciation improvement features. Trigger with phrases like "speak pronunciation training", "speak speech scoring", "secondary speak w...
Full skill instructions
Secondary workflow for Speak: Detailed pronunciation training with phoneme-level analysis and targeted practice.
speak-install-auth setupspeak-core-workflow-a// src/workflows/pronunciation-training.ts
import {
SpeakClient,
PronunciationTrainer,
PhonemeAnalyzer,
} from '@speak/language-sdk';
interface PronunciationConfig {
targetLanguage: string;
difficulty: 'beginner' | 'intermediate' | 'advanced';
focusPhonemes?: string[]; // Specific sounds to practice
category?: 'vowels' | 'consonants' | 'tones' | 'all';
}
async function initializePronunciationTraining(
client: SpeakClient,
config: PronunciationConfig
): Promise<PronunciationTrainer> {
const trainer = new PronunciationTrainer(client, {
language: config.targetLanguage,
difficulty: config.difficulty,
adaptiveMode: true, // Adjusts based on user performance
});
// Pre-load phoneme models for target language
await trainer.initialize();
// Set focus areas if specified
if (config.focusPhonemes) {
trainer.setFocusPhonemes(config.focusPhonemes);
}
return trainer;
}
interface DrillItem {
id: string;
text: string;
romanization?: string; // For non-Latin scripts
translation: string;
audioUrl: string;
targetPhonemes: string[];
difficulty: number;
}
interface DrillResult {
item: DrillItem;
userAudio: ArrayBuffer;
scores: PronunciationScores;
phonemeDetails: PhonemeResult[];
feedback: string[];
}
async function runPronunciationDrill(
trainer: PronunciationTrainer,
drillCount: number = 10
): Promise<DrillSession> {
const session = await trainer.startDrillSession({
itemCount: drillCount,
repeatOnMistake: true,
minScore: 70, // Repeat until 70% or better
});
const results: DrillResult[] = [];
while (!session.isComplete) {
// Get next drill item
const item = await session.getNextItem();
console.log('\n--- Pronunciation Drill ---');
console.log(`Say: "${item.text}"`);
if (item.romanization) {
console.log(`Romanization: ${item.romanization}`);
}
console.log(`Meaning: ${item.translation}`);
console.log('Listen to native pronunciation...');
// Play native audio for reference
await playAudio(item.audioUrl);
// Record user attempt
const userAudio = await recordUserAudio();
// Analyze pronunciation
const result = await session.submitAttempt({
itemId: item.id,
audioData: userAudio,
});
results.push({
item,
userAudio,
scores: result.scores,
phonemeDetails: result.phonemeDetails,
feedback: result.feedback,
});
// Display detailed feedback
displayPronunciationFeedback(result);
// Check if need to repeat
if (result.scores.overall < 70 && session.shouldRepeat) {
console.log('\nLet\'s try that one again...');
}
}
return session.getSummary();
}
interface PhonemeResult {
phoneme: string;
expected: string;
actual: string;
score: number;
issues: PhonemeIssue[];
visualGuide?: string; // Mouth position diagram URL
}
interface PhonemeIssue {
type: 'substitution' | 'omission' | 'addition' | 'distortion';
description: string;
tip: string;
}
function displayPronunciationFeedback(result: DrillResult) {
console.log(`\n📊 Pronunciation Score: ${result.scores.overall}/100`);
console.log(` Accuracy: ${result.scores.accuracy}/100`);
console.log(` Fluency: ${result.scores.fluency}/100`);
console.log(` Intonation: ${result.scores.intonation}/100`);
// Show problem phonemes
const problemPhonemes = result.phonemeDetails.filter(p => p.score < 70);
if (problemPhonemes.length > 0) {
console.log('\n🔍 Phonemes to improve:');
for (const p of problemPhonemes) {
console.log(` [${p.phoneme}] Score: ${p.score}/100`);
for (const issue of p.issues) {
console.log(` ⚠️ ${issue.type}: ${issue.description}`);
console.log(` 💡 Tip: ${issue.tip}`);
}
}
}
// Show overall feedback
if (result.feedback.length > 0) {
console.log('\n💬 Feedback:');
result.feedback.forEach(f => console.log(` • ${f}`));
}
}
interface WeaknessAnalysis {
phoneme: string;
averageScore: number;
attemptCount: number;
trend: 'improving' | 'stable' | 'declining';
suggestedDrills: DrillItem[];
}
async function generateAdaptivePractice(
trainer: PronunciationTrainer,
userHistory: DrillResult[]
): Promise<AdaptivePracticeSession> {
// Analyze user's weaknesses
const weaknesses = analyzeWeaknesses(userHistory);
// Generate targeted practice
const adaptiveSession = await trainer.createAdaptiveSession({
targetWeaknesses: weaknesses.map(w => w.phoneme),
intensity: 'focused', // or 'mixed' for variety
maxDuration: 15 * 60 * 1000, // 15 minutes
});
console.log('\n🎯 Adaptive Practice Plan:');
console.log(`Focus areas: ${weaknesses.map(w => w.phoneme).join(', ')}`);
return adaptiveSession;
}
function analyzeWeaknesses(results: DrillResult[]): WeaknessAnalysis[] {
const phonemeStats = new Map<string, number[]>();
// Collect scores by phoneme
for (const result of results) {
for (const p of result.phonemeDetails) {
if (!phonemeStats.has(p.phoneme)) {
phonemeStats.set(p.phoneme, []);
}
phonemeStats.get(p.phoneme)!.push(p.score);
}
}
// Identify weaknesses (average < 75)
const weaknesses: WeaknessAnalysis[] = [];
for (const [phoneme, scores] of phonemeStats) {
const avg = scores.reduce((a, b) => a + b, 0) / scores.length;
if (avg < 75) {
weaknesses.push({
phoneme,
averageScore: avg,
attemptCount: scores.length,
trend: calculateTrend(scores),
suggestedDrills: [], // Populated by trainer
});
}
}
return weaknesses.sort((a, b) => a.averageScore - b.averageScore);
}
async function pronunciationTrainingWorkflow() {
const client = getSpeakClient();
// Configure for Korean pronunciation (challenging for English speakers)
const config: PronunciationConfig = {
targetLanguage: 'ko',
difficulty: 'intermediate',
focusPhonemes: ['ㄱ', 'ㅋ', 'ㄲ'], // Korean aspirated/tense consonants
category: 'consonants',
};
console.log('Starting pronunciation training...');
console.log(`Language: ${config.targetLanguage}`);
console.log(`Focus: ${config.focusPhonemes?.join(', ') || 'General'}`);
// Initialize trainer
const trainer = await initializePronunciationTraining(client, config);
// Run initial assessment
console.log('\n📝 Initial Assessment...');
const assessment = await trainer.runAssessment();
console.log(`Baseline score: ${assessment.overallScore}/100`);
// Run pronunciation drills
const drillResults = await runPronunciationDrill(trainer, 10);
// Generate adaptive practice based on results
const adaptiveSession = await generateAdaptivePractice(
trainer,
drillResults.results
);
// Run adaptive practice
await adaptiveSession.run();
// Final summary
const summary = await trainer.getSessionSummary();
console.log('\n========== Training Complete ==========');
console.log(`Items practiced: ${summary.totalItems}`);
console.log(`Average score: ${summary.averageScore}/100`);
console.log(`Improvement: +${summary.improvement}%`);
return summary;
}
| Aspect | Workflow A (Conversation) | Workflow B (Pronunciation) |
|---|---|---|
| Primary Focus | Communication | Accuracy |
| Feedback Type | Holistic | Phoneme-level |
| Session Style | Free-form dialogue | Structured drills |
| Pacing | User-driven | System-driven |
| Best For | Fluency building | Accent reduction |
| Error | Cause | Solution |
|---|---|---|
| Audio Too Short | Brief recording | Minimum 0.5s audio |
| Background Noise | Poor recording conditions | Prompt for quieter environment |
| Phoneme Not Detected | Unclear speech | Slow down and articulate |
| Model Loading Failed | Network issue | Retry with fallback |
For common errors, see speak-common-errors.
Guide developers through setting up development environments with proper tools, dependencies, and configurations
Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...
Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".
Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.
Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...
Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".
Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".
Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.
Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...
Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.
Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...
Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience