Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cpich3g/azureopenaifm

Repository files navigation

AzureOpenAI.fm 🎙️🌟

MIT License [NextJS] [Azure OpenAI]

A playful, interactive demo that brings your text to life using Azure OpenAI Text-to-Speech! 🐰✨

Features 🛠️

  • 🎧 Choose from multiple voices like coral, sage, ash, and more
  • 🎵 Output formats: mp3 or wav
  • 🎲 Shuffle scripts & regenerate for fresh vibes
  • 📋 Copy ready-to-use code snippets for Python, JavaScript, and cURL
  • 💖 Cute, responsive UI for dev experimentation

Inspiration ❤️

Inspired by OpenAI.fm – thanks for the spark! 🌈

Getting Started 🚀

  1. Clone this repository:
git clone https://github.com/cpich3g/azureopenaifm.git
cd azureopenaifm
  1. Install dependencies:
npm install
  1. Create a .env.local file in the project root with your Azure credentials:
AZURE_OPENAI_ENDPOINT=https://<your-resource-name>.openai.azure.com
AZURE_OPENAI_API_KEY=<your_api_key>
  1. Start the development server:
npm run dev

Then open http://localhost:3000 to play! 🌟

Environment Variables 🌱

Variable Description
AZURE_OPENAI_ENDPOINT Your Azure OpenAI endpoint URL
AZURE_OPENAI_API_KEY Your Azure OpenAI API key (keep secret)

Deploying to Azure Container Apps 🌐

Ready to put your demo in the cloud? Follow these steps to containerize and deploy to Azure Container Apps:

  1. Prerequisites:

    • An Azure subscription.
    • Azure CLI installed and logged in (az login).
    • An Azure Container Registry (ACR) or another Docker registry.
  2. Build and push your Docker image:

# Log in to ACR (if using ACR)
az acr login --name <your-acr-name>

# Build the image
docker build -t <your-acr-name>.azurecr.io/azureopenaifm:latest .

# Push the image
docker push <your-acr-name>.azurecr.io/azureopenaifm:latest
  1. Create a resource group and Container Apps environment:
# Create a resource group
az group create --name myResourceGroup --location eastus

# Create a Container Apps environment
az containerapp env create \
  --name myContainerEnv \
  --resource-group myResourceGroup \
  --location eastus
  1. Deploy your container app:
az containerapp create \
  --name azureopenaifm \
  --resource-group myResourceGroup \
  --environment myContainerEnv \
  --image <your-acr-name>.azurecr.io/azureopenaifm:latest \
  --target-port 3000 \
  --ingress external
  1. Retrieve your app's public URL:
az containerapp show \
  --name azureopenaifm \
  --resource-group myResourceGroup \
  --query properties.configuration.ingress.fqdn \
  -o tsv
  1. Open the URL in your browser to see your live demo! 🎉

Replace placeholders like <your-acr-name>, myResourceGroup, and myContainerEnv with your actual resource names.

License 📄

This project is licensed under the MIT License. See LICENSE for details.

About

OpenAI.fm rendition for Azure OpenAI TTS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published