Skip to content

Unofficial library with the Go implementation of Deepgram's WebVTT and SRT formatting. Given a JSON transcription file, this library converts it to WebVTT or SRT captions.

License

Notifications You must be signed in to change notification settings

andrerfcsantos/deepgram-go-captions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepgram Go Captions

This package is the Go 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.

The package is not dependent on Deepgram, but it is expected that you will provide a JSON response from a transcription request from either Deepgram or one of the other supported speech-to-text APIs.

How it works

There are two main concepts in this package: covnerters and rederers.

Converters are responsible for converting API responses from a speech-to-text API into a shape that can be handled by the renderers.

Renderers are responsible for rendering the output of the converters into a subtitle format like SRT or WebVTT.

Current support

Converters:

  • ✅ Deepgram
  • ❌ (Planned) AssemblyAI
  • ❌ (Planned) Whisper

Renderers:

  • ✅ SRT
  • ✅ WebVTT

Context for this package

Deepgram does provide a go-sdk-package that can be used to call the Deepgram API. The Deepgram's SDK package initially did provide a way to generate WebVTT and SRT subtitltes from Deepgram's API responses, however that functionallity is now deprecated. To address the deprecation, Go users are pointed to the deepgram-js-captions package or the deepgram-python-captions package, which embrace a new Deepgram's philosophy of handling subtitle generation.

deepgram-go-captions is an unnoficial Go port of the deepgram-js-captions and deepgram-python-captions packages. For Go users, this means there's no need to switch to Python or JavaScript to generate subtitles from Deepgram's API responses (or any other supported API). For non-Go users, a simple binary built around the library is planned, which will make it easy to convert transcription files from API responses to subtitles, without the need to install any language.

Documentation

You can learn more about the Deepgram API at developers.deepgram.com.

About

Unofficial library with the Go implementation of Deepgram's WebVTT and SRT formatting. Given a JSON transcription file, this library converts it to WebVTT or SRT captions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages