Skip to content

Go backend service for NIA language assistant. Handles real-time audio processing and OpenAI API integration. WebSocket-based with low-latency streaming. πŸš€πŸ”Š

Notifications You must be signed in to change notification settings

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

Go backend service for NIA language assistant. Handles real-time audio processing and OpenAI API integration. WebSocket-based with low-latency streaming. πŸš€πŸ”Š

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages