Prompt Content
Integrate Sarvam AI's speech-to-text capabilities to allow users to verbally provide their `skill_description` and `name` to the 'SkillProofAgent'. The agent should then process this voice input to populate the document fields. Describe how Sarvam AI would convert speech to text and how your Mastra AI agent would then interpret and act upon this text input to start generating a SkillProof document. Provide a conceptual flow.
```typescript
// Conceptual integration with Sarvam AI and Mastra Agent
// import SarvamClient from 'sarvam-ai-sdk'; // Hypothetical SDK
// const sarvam = new SarvamClient({ apiKey: 'YOUR_SARVAM_API_KEY' });
// async function processVoiceInput(audioData: Buffer) {
// const transcription = await sarvam.speechToText(audioData); // Use Sarvam ASR
// // Then, send transcription to Mastra AI agent
// // const agentResponse = await agent.run(transcription);
// // Agent's turn handler would parse transcription, extract intent (e.g., 'create_skill_proof'),
// // and update the SkillProofDocument state based on extracted skillDescription and name.
// return 'SkillProof document started based on your voice input.';
// }
// Mastra AI agent would have a handler that understands intents from natural language:
// agent.onIntent('create_skill_proof', async ({ payload, state }) => {
// state.set('skillProofDocument', { skillName: payload.skill, descriptionGenerated: '', ... });
// return 'Got it. Generating your skill proof.';
// });
```Try this prompt
Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.
Related Prompts
Explore similar prompts from our community
Usage Tips
Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)
Customize placeholder values with your specific requirements and context
For best results, provide clear examples and test different variations