Speak Hello World
Overview
Minimal working example demonstrating core Speak functionality for AI-powered language learning.
Prerequisites
- Completed
speak-install-authsetup - Valid API credentials configured
- Development environment ready
- Microphone access for speech input (optional for testing)
Instructions
- For full implementation details, load:
Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)
Output
- Working code file with Speak client initialization
- Successful lesson session creation
- AI tutor prompt and feedback displayed
- Console output showing:
AI Tutor says: Hola! Welcome to your Spanish lesson. Let's practice greetings. Can you say "Hello, my name is..." in Spanish?
Audio URL: https://speak.com/audio/abc123.mp3
Feedback: Great job! Your pronunciation was clear.
Pronunciation: 85
Grammar: [No corrections needed]
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Import Error | SDK not installed | Verify with npm list @speak/language-sdk |
| Auth Error | Invalid credentials | Check environment variables are set |
| Session Timeout | Exceeded lesson duration | Extend session or start new one |
| Rate Limit | Too many requests | Wait and retry with exponential backoff |
| Language Not Supported | Invalid language code | Use supported language codes |
Examples
See references/implementation-guide.md for detailed examples.
Resources
Next Steps
Proceed to speak-local-dev-loop for development workflow setup.