Giter Site home page Giter Site logo

jasonwebb / revealjs-subtitles Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 6 KB

A Reveal.js plugin to add real-time subtitles to presentations

CSS 21.23% JavaScript 78.77%
reveal-js reveal-js-plugin subtitles presentation transcription speech-to-text web-speech-api

revealjs-subtitles's Introduction

Installation

  1. Clone or download this repo.
  2. Copy the subtitles folder into the Reveal.js plugin folder.
  3. Add a reference to the CSS file in your presentation's HTML file:
<link rel="stylesheet" href="plugin/subtitles/subtitles.css">
  1. Load the JavaScript file as a dependency through the Reveal.js initialize function:
<script>
Reveal.initialize({
  dependencies: [
    { src: 'plugin/subtitles/subtitles.js', async: true }
  ]
});
</script>

How it works

This plugin uses the SpeechRecognition interface of the Web Speech API available in Chrome (as of September 2019) to do real-time speech-to-text transcription.

On load, this plugin will inject the following HTML at the end of your presentation's DOM:

<div id="subtitles-container">
  <div id="subtitles-inner-container">
    <div id="subtitles">
      <span id="final_text"></span>
      <span id="interim_text"></span>
    </div>
  </div>
</div>
  • final_text will contain text that has been fully parsed by the speech-to-text engine.
  • interim_text will contain text that is actively being parsed, and may change. Once the engine has fully parsed it, this text will be appended to the text in final_text.

Requirements

revealjs-subtitles's People

Contributors

jasonwebb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

revealjs-subtitles's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.