Code Monkey home page Code Monkey logo

deepgram / deepgram-js-captions Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 136 KB

This package is the JavaScript implementation of Deepgram's WebVTT and SRT formatting. Given a transcription, this package can return a valid string to store as WebVTT or SRT caption files.

Home Page: https://github.com/deepgram/deepgram-js-captions

License: MIT License

JavaScript 3.33% TypeScript 96.67%
asr audio closed-captions deepgram ffmpeg javascript sdk speech speech-to-text srt stt subtitles transcription typescript webvtt youtube

deepgram-js-captions's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cosanostratr

deepgram-js-captions's Issues

Voice tags are not closed

What is the current behavior?

If speaker diarization is used, the voice tags <v Speaker> are not closed. The closing tag is missing.

Steps to reproduce

Convert deepgram output with different speakers to VTT.

Expected behavior

<v Speaker>Hello!</v>

BUG: TypeError in DeepgramConverter for Nova-2 Model

What is the current behavior?

I am seeing a TypeError when using the srt parser from the @deepgram/captions library:

TypeError: Cannot use 'in' operator to search for 'speaker' in undefined
    at DeepgramConverter.getLines (.../@deepgram/captions/src/converters/DeepgramConverter.ts:22:32)
    at srt (.../@deepgram/captions/src/index.ts:54:20)

Steps to reproduce

This error is occurring when using the deepgram nova-2 model via the REST api:

      method: 'POST',
      url: 'https://api.deepgram.com/v1/listen',
      params: {
        model: 'nova-2',
        punctuate: true,
        smart_format: true,
        paragraphs: true
      }

Expected behavior

The srt parser works on the nova-2 output without any errors

Please tell us about your environment

  • node v18.19.1

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.