Code
from cytopia.tools import get_memoized_transcription, get_memoized_summarization, get_memoized_structured_summarization, get_memoized_structured_summarization_inc
import os
# Constants and productions
chemin_audio = "data/interview.m4a"
transcript_path = "data/transcript.txt"
summary_path = "data/summary.md"
graph_path = "data/knowledge_graph.json"
graph_path_inc = "data/knowledge_graph_inc.json"
Code
transcript = get_memoized_transcription(chemin_audio, transcript_path)
print(f'[Link to the transcription]({transcript_path})')
Link to the transcription
Code
_ = get_memoized_summarization(transcript, summary_path)
print(f'[Link to the summarization]({summary_path})')
Link to the summarization
Code
structured_summary = get_memoized_structured_summarization(transcript, graph_path)
_ = get_memoized_structured_summarization_inc(structured_summary, graph_path_inc)
print(f'[Link to the json graph]({graph_path_inc})')
Link to the json graph
Code
html`
${new MindmapChart(await FileAttachment("data/knowledge_graph_inc.json").url()).render()}
`