Skip to content

Official AssemblyAI sample project using WebRTC for real-time speech-to-text from the browser

Notifications You must be signed in to change notification settings

AssemblyAI/assemblyai-webrtc-sample-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AssemblyAI Sample WebRTC Project

This sample project uses the AssemblyAI WebRTC wrapper to stream audio from the browser to the AssemblyAI API for near real-time speech-to-text.

Only tested in Chrome and Firefox.

Getting started

  1. Clone this repo

  2. Fill in your API Token on line 2 in js/demo.js

    const API_TOKEN = "your-secret-api-token";
    
  3. Stand up a simple HTTP Server to serve the static files in this repo

    # This will start a static server on http://localhost:8000.
    # This server is insecure, and should only be used for demos
    # and testing.
    python -m SimpleHTTPServer
    
  4. Go to http://localhost:8000 to visit your local server. Click "Allow" when the browser asks for permission to use your microphone.

Note: WebRTC requires your website to be served on localhost or over SSL in order to access the microphone.

  1. Click the red "RECORD" button and start talking!

Details about the AssemblyAI wrapper library can be found at AssemblyAI Wrapper

About

Official AssemblyAI sample project using WebRTC for real-time speech-to-text from the browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages