Skip to content

An example application to help you get started with Deepgram text-to-speech using WebSockets

License

Notifications You must be signed in to change notification settings

deepgram-starters/dotnet-live-text-to-speech

Repository files navigation

Text-to-Speech WebSocket Starter for .NET

This example app demonstrates how to use the Deepgram Text-to-Speech API over WebSockets with .NET.

The flow of this sample is:

  1. A websocket is opened from the UI to the backend .NET component
  2. Text is sent over a websocket to the backend component
  3. If a connection has not been established to Deepgram, create a websocket connection using the Python SDK and send the text to convert to audio
  4. An audio byte response with synthesized text-to-speech is returned and forward back through the WebSocket created by the UI
  5. Those audio bytes are then played by the media device contained within your browser

A preview of the app

What is Deepgram?

Deepgram is a voice AI company providing speech-to-text and language understanding capabilities to make data readable and actionable by human or machines.

Sign-up to Deepgram

Before you start, it's essential to generate a Deepgram API key to use in this project. Sign-up now for Deepgram and create an API key.

Quickstart

Manual

Follow these steps to get started with this starter application.

Clone the repository

Navigate to GitHub and clone the repository.

Install dependencies

Install the project dependencies.

dotnet add package Deepgram

Set your Deepgram API key

Set your DEEPGRAM_API_KEY environment variable in your user environment variables in the control panel.

Run the .NET Application

There are multiple ways of starting this application. If you are using Visual Studio, you can start a debug session. You can also build the application and run it from the command line.

Open the UI in a Browser

To open the Frontend UI, just navigate to http://localhost:3000 in Chrome.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Security Policy details the procedure for contacting Deepgram.

Getting Help

We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

Author

Deepgram

License

This project is licensed under the MIT license. See the LICENSE file for more info.

About

An example application to help you get started with Deepgram text-to-speech using WebSockets

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages