Skip to content

bielcarpi/nia-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NIA Backend

The NIA Backend powers the NIA language learning assistant with real-time audio processing and AI integration. Built with Go and optimized for low-latency communication, it handles all AI interactions and audio streaming between the mobile app and OpenAI's services.

Features

  • WebSocket Audio Streaming
  • OpenAI API Integration
  • Authentication Middleware
  • Low-latency Processing
  • Cloud Deployment
  • Self-hosted AI Models

Project Structure

.
├── config/           # Configuration management
├── pkg/
│   ├── api/         # HTTP/WebSocket handlers
│   ├── openai/      # OpenAI API integration
│   └── util/        # Helper functions
└── migrations/      # Database migrations

Getting Started

Prerequisites

  • Go 1.19+
  • OpenAI API key
  • Google Cloud SDK

Installation

# Clone the repository
git clone https://github.com/bielcarpi/nia_backend.git

# Install dependencies
go mod download

# Run locally
go run main.go

Deployment

# Deploy to Google Cloud App Engine
gcloud app deploy

Architecture

The backend implements a clean architecture pattern with:

  • WebSocket handlers for real-time communication
  • OpenAI service integration (GPT-3.5, Whisper, TTS)
  • Authentication middleware
  • Helper utilities

Audio Processing

  • Real-time streaming via WebSocket
  • AAC codec support
  • Optimized for low latency
  • Future PCM16 support planned

About

Small Go backend service for NIA language assistant. Handles real-time audio processing and OpenAI API integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages