Skip to content

Latest commit

 

History

History
86 lines (54 loc) · 2.19 KB

README.md

File metadata and controls

86 lines (54 loc) · 2.19 KB

ChatGPT-Azure-Speech

This is a demonstration application that leverages the capabilities Azure Speech Service to enable users to talk with ChatGPT . This repository hosts the codebase, instructions, and resources needed to set up and run the application.

chatgpt-azure-speech-demo.mp4

Features

  • Use Azure Speech for ASR and TTS when talking with ChatGPT

Installation

To get started, follow these steps:

  1. Clone the repository:
git clone https://github.com/linjungz/chatgpt-azure-speech.git
  1. Change into the chatgpt-azure-speech directory:
cd chatgpt-azure-speech
  1. Install the required Python packages:

Create virtual environment:

python3 -m venv .venv
source .venv/bin/activate

Install depenancies:

pip install -r requirements.txt

Configuration

  1. Obtain your Azure OpenAI API key, Endpoint and Deployment Name from the Azure Portal.
  2. Obtain your Azure Speech Key and Region from Azure Portal.
  3. Create .env in the root dir and set the environment variables in the file:
OPENAI_API_BASE=https://your-endpoint.openai.azure.com
OPENAI_API_KEY=your-key-here
OPENAI_DEPLOYMENT=your-gpt-deployment-name
OPENAI_API_VERSION=2023-07-01-preview
SPEECH_KEY=your-key-here
SPEECH_REGION=region

Azure OpenAI

Here's where you can find the deployment names for GPT: Alt text

For supported openai version, you could check this link for more information.

Azure Speech

Here's where you can find key and region: Alt text

Run

This will initialize the application based on Streamlit and open up the user interface in your default web browser.

$ streamlit run app.py --server.address '0.0.0.0'

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.


  You can now view your Streamlit app in your browser.

  URL: http://0.0.0.0:8501```

Credits