npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

transcord

v0.2.0

Published

A simple recording and transcription module.

Downloads

18

Readme

Transcord

A simple recording and transcription module.

Summary

Getting started

Quick Start

Multiples start options are available :

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.

showMicIconNode

  • Type : Boolean || jQuery Node
  • Default : true

If the value is set to false, the mic icons aren't displayed. If the value is set to true, the mic icons are appended into the parent of target element. A jQuery node can be passed, thus appending the mics into this node.

imgMicIdle

  • Type : url
  • Default : base64 img (assets/mic.gif in b64)

Mic icon when not recording.

imgMicRecording

  • Type : url
  • Default : base64 img (assets/mic-animate.gif in b64)

Mic icon when recording.

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.

onBlob

  • Type : function
  • Default : null

Things to do with the Blob object containing the recording. Example :

onBlob : function(event, blob){
  $(this).transcord('downloadBlob', blob, 'record');
}

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.

downloadBlob

$('elm').transcord('downloadBlob', blob, [filename]);

Download the blob on client navigator. A filename can be specified.

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