Metadata-Version: 2.1
Name: wordcab
Version: 0.7.0
Summary: 📖 Transcribe and Summarize any business communication at scale with Wordcab's API
Project-URL: Changelog, https://github.com/Wordcab/wordcab-python/releases
Project-URL: Documentation, https://wordcab-python.readthedocs.io
Project-URL: Homepage, https://github.com/Wordcab/wordcab-python
Project-URL: Issues, https://github.com/Wordcab/wordcab-python/issues
Project-URL: Source, https://github.com/Wordcab/wordcab-python
Author-email: Thomas Chaigneau <thomas@wordcab.com>, Wordcab <info@wordcab.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: api,sdk,summarization,transcription,wordcab
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet
Classifier: Topic :: Software Development
Requires-Python: <3.12,>=3.8
Requires-Dist: click>=8.0.1
Requires-Dist: requests>=2.31.0
Requires-Dist: validators>=0.20.0
Provides-Extra: docs
Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.1.0; extra == 'docs'
Requires-Dist: mkdocs-material>=8.5.4; extra == 'docs'
Requires-Dist: mkdocs>=1.4.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.20.0; extra == 'docs'
Provides-Extra: quality
Requires-Dist: black>=22.10.0; extra == 'quality'
Requires-Dist: pre-commit>=2.20.0; extra == 'quality'
Requires-Dist: ruff>=0.0.263; extra == 'quality'
Provides-Extra: tests
Requires-Dist: httpx>=0.23.3; extra == 'tests'
Requires-Dist: pytest-asyncio>=0.21.1; extra == 'tests'
Requires-Dist: pytest-cov>=4.1; extra == 'tests'
Requires-Dist: pytest>=7.4; extra == 'tests'
Requires-Dist: responses>=0.23.3; extra == 'tests'
Description-Content-Type: text/markdown

<h1 align="center">Wordcab Python</h1>
<p align="center">📖 Transcribe and Summarize any business communication at scale with Wordcab's API</p>

<div align="center">
	<a  href="https://pypi.org/project/wordcab" target="_blank">
		<img src="https://img.shields.io/pypi/v/wordcab.svg" />
	</a>
	<a  href="https://pypi.org/project/wordcab" target="_blank">
		<img src="https://img.shields.io/pypi/pyversions/wordcab" />
	</a>
	<a  href="https://github.com/Wordcab/wordcab-python/blob/main/LICENSE" target="_blank">
		<img src="https://img.shields.io/pypi/l/wordcab" />
	</a>
	<a  href="https://github.com/Wordcab/wordcab-python/actions?workflow=ci-cd" target="_blank">
		<img src="https://github.com/Wordcab/wordcab-python/workflows/Tests/badge.svg" />
	</a>
	<a  href="https://app.codecov.io/gh/Wordcab/wordcab-python" target="_blank">
		<img src="https://codecov.io/gh/Wordcab/wordcab-python/branch/main/graph/badge.svg" />
	</a>
	<a  href="https://github.com/pypa/hatch" target="_blank">
		<img src="https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg" />
	</a>
</div>

---

**Wordcab** is a transcription and summarization service that provides a simple API to summarize any `audio`, `text`, or `JSON` file.

It also includes compatibility with other transcripts platforms like:
[![AssemblyAI](https://img.shields.io/badge/AssemblyAI-blue)](https://www.assemblyai.com/)
[![Deepgram](https://img.shields.io/badge/Deepgram-green)](https://deepgram.com/)
[![Rev.ai](https://img.shields.io/badge/Rev.ai-orange)](https://www.rev.ai/)
[![Otter.ai](https://img.shields.io/badge/Otter.ai-purple)](https://otter.ai/)
[![Sonix.ai](https://img.shields.io/badge/Sonix.ai-yellow)](https://sonix.ai/)

## Getting started

You can learn more about Wordcab services and pricing on our [website](https://wordcab.com/).

If you want to try out the API, you can [signup](https://wordcab.com/signup/) for a free account and start using the API
right away.

## Requirements

- OS:
  - ![Linux](https://img.shields.io/badge/-Linux-orange?style=flat-square&logo=linux&logoColor=white)
  - ![Mac](https://img.shields.io/badge/-Mac-blue?style=flat-square&logo=apple&logoColor=white)
  - ![Windows](https://img.shields.io/badge/-Windows-blue?style=flat-square&logo=windows&logoColor=white)
- Python:
  - ![Python 3.8+](https://img.shields.io/badge/python-3.8%2B-blue)

## Installation

You can install _Wordcab Python_ via pip from [PyPI](https://pypi.org/project/wordcab/):

```console
$ pip install wordcab
```

Start using the API with any python script right away!

## Usage

### Start Summary full pipeline

```python
import time
from wordcab import retrieve_job, retrieve_summary, start_summary
from wordcab.core_objects import AudioSource, GenericSource, InMemorySource


# Prepare your input source
## For a transcript stored as a .txt or .json file
source = GenericSource(filepath="path/to/file.txt")  # Or file.json
## For a transcript stored as an audio file
source = AudioSource(filepath="path/to/file.mp3")
## For a transcript already in memory
transcript = {"transcript": ["SPEAKER A: Hello.", "SPEAKER B: Hi."]}
source = InMemorySource(obj=transcript)

# Launch the Summarization job
job = start_summary(
	source_object=source,
	display_name="sample_txt",
	summary_type="narrative",
	summary_lens=[1, 3],
	tags=["sample", "text"],
)

# Wait for the job completion
while True:
	job = retrieve_job(job_name=job.job_name)
	if job.job_status == "SummaryComplete":
		break
	else:
		time.sleep(3)

# Get the summary id
summary_id = job.summary_details["summary_id"]
# Retrieve the summary
summary = retrieve_summary(summary_id=summary_id)

# Get the summary as a human-readable string
print(summary.get_formatted_summaries())

# Save the json object to a file
with open("wordcab_summary.json", "w") as f:
	f.write(summary)
```

## Documentation

Please see the [Documentation](https://wordcab-python.readthedocs.io/) for more details.

## Contributing

Contributions are very welcome. 🚀
To learn more, see the [Contributor Guide](https://github.com/Wordcab/wordcab-python/blob/main/CONTRIBUTING.md).

## License

- Distributed under the terms of the [![Apache 2.0 License Badge](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

- _Wordcab Python SDK_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue](https://github.com/Wordcab/wordcab-python/issues) along with a detailed description.
