Logo Lanfrica

Emmanuel-PaulMaah/naija-lang

Domain:

natural language processing

Record type:

softwaretools
Creator:
Emm
Host:
language learning app for yoruba with text-to-speech &speech-to-text # Naija Lang 🇳🇬 An interactive language learning application for Yoruba with AI-powered text-to-speech and speech-to-text capabilities. ## Features - **Text-to-Speech (Spitch)** - Convert Yoruba text to natural-sounding audio - **Speech-to-Text (Deepgram)** - Transcribe spoken Yoruba to text - **Interactive Lessons** - Structured learning content with audio - **Progress Tracking** - Monitor your learning journey - **Responsive Design** - Works on desktop, tablet, and mobile ## Tech Stack - **Frontend**: Next.js 16, React 19, TypeScript, Tailwind CSS - **Backend**: Next.js API Routes - **Speech Services**: - Spitch API (Text-to-Speech) - Deepgram API (Speech-to-Text) ## Prerequisites - Node.js 18+ - npm or yarn - Spitch API key - Deepgram API key ## Setup ### 1. Clone the repository ```bash git clone github.com cd naija-lang ``` ### 2. Install dependencies ```bash npm install ``` ### 3. Configure API Keys Create a `.env.local` file in the project root: ```bash NEXT_PUBLIC_SPITCH_API_KEY=your_spitch_api_key NEXT_PUBLIC_DEEPGRAM_API_KEY=your_deepgram_api_key ``` **Get your keys:** - Spitch API - Sign up and get your API key - Deepgram API - Sign up and get your API key ### 4. Run the development server ```bash npm run dev ``` Open localhost in your browser. ## Usage ### Text-to-Speech ```tsx import { TextToSpeechButton } from '@/components/TextToSpeechButton'; export default function Page() { return ; } ``` ### Speech-to-Text ```tsx import { SpeechToTextButton } from '@/components/SpeechToTextButton'; export default function Page() { return ; } ``` ### Custom Implementation ```tsx import { useTTS, useSTT } from '@/lib/audio-hooks'; export default function AudioApp() { const { speak, stop, isLoading } = useTTS(); const { startRecording, stopRecording, isRecording, transcript } = useSTT(); return ( speak('Hello')}>Speak startRecording()}>Record {transcript && {transcript.text} } ); } …