Skip to content

CouncilDataProject/transcript-file-format

Repository files navigation

transcript-file-format

Build Status Documentation

A generalized transcript file format and utilities for parsing.


Installation

Stable Release: pip install transcript-file-format
Development Head: pip install git+https://github.com/CouncilDataProject/transcript-file-format.git

Quickstart

from transcript_file_format import Transcript, Sentence, to_json, from_json

# Create a transcript with metadata
t = Transcript(
    sentences=[
        Sentence(
            start_time=0.1,
            end_time=1.2,
            text="hello world",
        ),
        Sentence(
            start_time=1.4,
            end_time=2.6,
            text="my name is eva",
        ),
    ],
    generator="Hand Written by Eva",
    session_datetime="2023-04-05",
    created_datetime="2023-04-06",
)

# Store to JSON
to_json(t, "example.json")

# Read from JSON back to object
t = from_json("example.json")
# Transcript(sentences=[...] (n=2), generator='Hand Written by Eva', confidence=None, session_datetime='2023-04-05', created_datetime='2023-04-06', annotations=None)

Documentation

For full package documentation please visit CouncilDataProject.github.io/transcript-file-format.

Development

See CONTRIBUTING.md for information related to developing the code.

MIT License

About

A generalized transcript file format and utilities for parsing.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published