跳转到主要内容

未提供项目描述

项目描述

Conversations

PyPI - Version PyPI - Python Version Tests

介绍 "Conversations" - 一个旨在探索对话分析真正潜能的Python包。凭借其转录、分割和生成视觉吸引力强的HTML报告的能力,"Conversations"使您能够深入了解人类交流的复杂性。认识到对话中充满了意义,不仅通过语言,而且通过诸如响度、音调和语速等关键声学特征传达,此包提供了一款不可或缺的工具,用于理解和解释日常交流中嵌入的大量信息。Conversations使您能够分析和理解人类互动的复杂世界。

文档

包括概述、API和示例在内的全面文档可以在此找到。此处

安装

pip install conversations

使用方法

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()
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

项目详情


下载文件

下载适用于您平台文件的文件。如果您不确定选择哪一个,请了解更多关于 安装包 的信息。

源代码分发

conversations-0.36.3.tar.gz (21.7 kB 查看哈希值)

上传时间 源代码

构建分发

conversations-0.36.3-py3-none-any.whl (19.9 kB 查看哈希值)

上传时间 Python 3

支持者