JSPM

transcord

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q35042F
  • License MIT

A simple recording and transcription module.

Package Exports

  • transcord

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (transcord) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Transcord

A simple recording and transcription module.

Summary

Getting started

Quick Start

Installation

Include the file :

<script src="path/to/transcord.js"></script>

Usage

<!-- Create a textarea element -->
<textarea id="transcord"></textarea>
('#transcord').transcord({options});

Options

record

  • Type : Boolean
  • Default : true

Define wether to record the user audio input.

transcript

  • Type : Boolean
  • Default : true

Define wether to transcript the user audio input into text.

transcriptLanguage

  • Type : Enum
  • Default : 'en-US'

Which language the user is using.

transcriptLanguage

  • Type : Enum
  • Default : 'en-US'

Which language the user is using.

isTranscriptPersistent

  • Type : Boolean
  • Default : true

Define if the old text must be kept when updating transcription.

transcriptgrammar

  • Type : SpeechGrammarList
  • Default : undefined

Restrict instance grammar with the given SpeechGrammarList.

recordNumber

  • Type : Integer
  • Default : 1

Number of blob than can be displayed at the same time.

onInit

  • Type : function
  • Default : null

Things to do on initialization.

onStart

  • Type : function
  • Default : null

Things to do when record/transcript starts.

onStop

  • Type : function
  • Default : null

Things to do when record/transcript stops.

Methods

The following methods can be called like this :

$().transcord('method');

startRecording

Start to record/transcript.

stopRecording

Stop to record/transcript.

toogleRecord

Start/Stop to record/transcript.

displayBlob

$('elm').transcord('displayBlob', blob, [$node]);

Display the blob in a audio tag added to $node. If node is not specified, the audio tag will be added after elm.

destroyBlob

$().transcord('displayBlob',index);

Remove the audio tag in the DOM and destroy the blob url corresponding the the index parameter. The index can be a number, an array of number and also a string. "first" will destroy the first blob recorded. "last" will destroy the last blob recorded. "all" will destroy all blobsURL.

getBlobs

Returns all the blobs of records.

trigger

Trigger event manually

##Browser support

To record the user audio input, the browser must support getUserMedia()

To transcript, the browser must [support the Speech Recognition API] (http://caniuse.com/#feat=speech-recognition)

##License MIT

⬆ back to top