Conversations
Introducing "Conversations" - a Python package designed to
explore the true potential of conversational analysis.
With its ability to transcribe, diarise, and generate visually appealing HTML reports,
"Conversation" empowers you to delve deeper into the intricacies of human communication.
Recognizing that conversations are brimming with meaning
conveyed not just through language,
but also through key acoustic features like loudness, intonation, and speech rate,
this package brings forth an indispensable tool for understanding and
interpreting the wealth of information embedded in everyday exchanges.
Conversations enables you to analyse and comprehend
the complex world of human interaction.
Documentation
Comprehensive documentation, including overview, API, and examples, can be found here.
Installation
pip install conversations
Install the optional dependencies for local processing with:
pip install conversations[local]
Usage
from pathlib import Path
from conversations import Conversation
# Information about the conversation
audio_file = Path('/path/to/audio.mp4')
speaker_mapping={"0": "Alice", "1": "Bob", "2": "Sam"}
# Load the conversation
conversation = Conversation(recording=audio_file, speaker_mapping=speaker_mapping)
# Process the conversation
conversation.transcribe(custom_terms=["Alice", "Bob"])
conversation.diarise()
conversation.save()
# Generate an interactive HTML version of the conversation
html_report = conversation.report()
with open('conversation.html', 'w') as f:
f.write(html_report.render())
# Generate a text file of the conversation
text_report = conversation.export_text()
with open('conversation.txt', 'w') as f:
f.write(text_report)
# Generate a text file summarising the conversation
summary = conversation.summarise()
with open('conversation-summary.txt', 'w') as f:
f.write(summary)
# Query the conversation
answer = conversation.query("What was the value of operating cash flow we were discussing?")
print(f"The answer to your query is: {answer}")
print(summary)
# The answer to your query is: The value of operating cash
# flow being discussed was $210 million in the last 12 months.
# Summary:
# In the meeting, Alice, Sam and Bob discuss the financial state of
# businesses, the challenges of companies going private, and the
# evolution of private equity firms' return expectations. They
# also touch on the industry's early risk-taking nature. Bob
# mentions historical deals as examples of the early risk-taking
# nature of private equity firms.
#
# Key Points:
# 1. Challenges of companies going private
# Alice: "Challenges of companies going private, especially in
# terms of cutting expenses and finding new ways to pay
# employees who were previously compensated with stocks."
# 2. Private equity firms' return expectations
# Sam: "What are private equity firms' return expectations
# when purchasing a company?"
# 3. Evolution of the private equity industry
# Bob: "The industry has evolved over time, with early private
# equity firms taking on riskier ventures,
# similar to venture capitalists."
# ...
#
# Action Items:
# None discussed in the meeting.
#
# 20 Keywords (most to least relevant):
# 1. Financial state
# 2. Business
# 3. Operating cash flow
# ...
#
# 10 Concepts/Themes (most to least relevant):
# 1. Financial challenges
# 2. Going private
# 3. Private equity
# ...
#
# Most unexpected aspect of the conversation:
# The most unexpected aspect of the conversation was the mention of
# historical deals like RJR Nabisco and TWA Airlines as examples
# of the early risk-taking nature of private equity firms.
#
# Concepts/Topics explained in the transcript:
# 1. Private equity firms' return expectations:
# Bob explains that the industry has evolved over time,
# with early private equity firms taking on riskier ventures,
# similar to venture capitalists. No inaccuracies were identified.
#
# Tone of the conversation:
# Overall tone: Informative and analytical
# Alice's tone: Concerned and analytical
# Bob's tone: Informative and explanatory
# Sam's tone: Inquisitive
Transcription providers
transcribe() uses AssemblyAI by default. Choose a provider with method:
assembly(default):universal-3-5-pro,universal-3-pro,universal-2. NeedsASSEMBLYAI_API_KEY.deepgram:nova-3(default),nova-3-medical,nova-2. NeedsDEEPGRAM_API_KEY.whisper(local):tiny,base,small,medium,largeand their.envariants.
conversation.transcribe(method="deepgram", custom_terms=["Alice", "Bob"])
AssemblyAI and Deepgram diarise during transcription, so diarise() is skipped
for them and speakers are labelled Speaker_A, Speaker_B and so on.
Deepgram requests opt out of Deepgram's Model Improvement Program
(mip_opt_out).
Metadata
Release files for conversations 0.45.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| conversations-0.45.0.tar.gz | 32.6 kB | Without provenance | Details for conversations-0.45.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conversations-0.45.0-py3-none-any.whl | Python 3 | none | any | Details for conversations-0.45.0-py3-none-any.whl |
Total release size: 58.7 kB
Release files / conversations-0.45.0.tar.gz
| Download URL | conversations-0.45.0.tar.gz |
|---|---|
| Size | 32.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b02932c2741bad70fd1463385ea92e071c0c4360ce7db1b1f457cdf7301f315c
|
|
BLAKE2b-256 checksum How to use checksums |
65f7e4b8741b9f5e58a2880729aea3e49233c747fb8145070b51d2bc3d46f3fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.13.3 readme-renderer/46.0 requests/2.34.2 requests-toolbelt/1.0.0 urllib3/2.8.0 tqdm/4.70.1 importlib-metadata/9.0.1 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.22
|
Release files / conversations-0.45.0-py3-none-any.whl
| Download URL | conversations-0.45.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65a21e1a0c8e285cd62fa1401221e66a4c615df83e689a92bb0283012409acac
|
|
BLAKE2b-256 checksum How to use checksums |
1090da8638993976ca9a6184b8a16217c0be726d38f878bf70dba15ee2ac9754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.13.3 readme-renderer/46.0 requests/2.34.2 requests-toolbelt/1.0.0 urllib3/2.8.0 tqdm/4.70.1 importlib-metadata/9.0.1 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.22
|
Security for conversations 0.45.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.