Skip to content

Simple .NET console application to demonstrate the GPT Realtime API by 'calling' Santa Claus.

License

Notifications You must be signed in to change notification settings

tsjdev-apps/santaclaus-realtime-api

Repository files navigation

Use the GPT Realtime (Mini) model to have a conversation with Santa Claus

header

This repository provides a .NET 10 console application that integrates the GPT Realtime Model. The application demonstrates how to communicate using your voice.

Features

  • GPT Realtime or GPT Realtime Mini: AI Models to communicate using Text, Images or Audio.
  • Modular Design: Utilizes helper classes for streamlined code management and readability.

Prerequisites

Project Strucutre

  • Program.cs: Entry point of the application.
  • Assets/wishes.json: Data file containing wishes of several persons.
  • Helpers/AudioInputHelper.cs: Contains methods for getting the audio from the microphone.
  • Helpers/AudioOutputHelper.cs: Contains methods to play audio on the default speaker.
  • Helpers/ConsoleHelper.cs: Contains methods for enhanced console interactions using Spectre.Console.
  • Helpers/FileHelper.cs: Contains methods to read a local file.
  • Models/WishItem.cs: Model file for a specific wish item.
  • Utils/ConversationFunctionToolStatics.cs: Contains methods for custom chat tools.
  • Utils/PromptStatics.cs: Contains all the prompts used within the application.
  • Utils/Statics.cs: Provides static constants for various (Azure) OpenAI models and keys.

Usage

Upon running the application, it will prompt you to enter your credentials. The application will then start listening to the microphone and you are able to interact with Santa Claus.

Application in Action

Watch the video

Blog Posts

If you are more interested into details, please see the following posts on medium.com or in my personal blog:

About

Simple .NET console application to demonstrate the GPT Realtime API by 'calling' Santa Claus.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages