-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
80 lines (57 loc) · 2.08 KB
/
main.py
File metadata and controls
80 lines (57 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# cython: language_level=3
from transmeet.processor import transcribe_audio_file, generate_podcast_script_from_transcript, synthesize_podcast_audio, generate_mind_map_from_transcript, segment_speech_by_speaker
import os
import json
if __name__ == "__main__":
audio_path = "/home/alpha/Downloads/Mandatory isms awareness training session india.wav"
transcript = transcribe_audio_file(
audio_path=audio_path,
)
print("Transcription:")
print(transcript)
# save transcript to file
# with open("transcript.md", "w") as f:
# f.write(transcript)
# # transcript.md
# with open("transcript.md", "r") as f:
# transcript = f.read()
# # segment conversation by speaker
# segmented_transcript = segment_speech_by_speaker(
# transcript=transcript,
# llm_client="groq",
# llm_model="llama-3.3-70b-versatile"
# )
# print("Segmented Transcript:")
# # print(segmented_transcript)
# # save segmented transcript to file
# with open("segmented_transcript.md", "w") as f:
# f.write(segmented_transcript)
# mind_map_json = generate_mind_map_from_transcript(
# transcript=transcript,
# llm_client="groq",
# llm_model="llama-3.3-70b-versatile"
# )
# print("Mind Map JSON:")
# print(mind_map_json)
# with open("mind_map.json", "w") as f:
# json.dump(mind_map_json, f, indent=4)
# # create transcript to podcast text
# podcast_text = generate_podcast_script_from_transcript(
# transcript=transcript,
# llm_client="groq",
# llm_model="llama-3.3-70b-versatile"
# )
# print("Podcast Text:")
# print(podcast_text)
# # save podcast text to file
# with open("podcast.md", "w") as f:
# f.write(podcast_text)
# with open("podcast.md", "r") as f:
# podcast_text = f.read()
# # create podcast audio
# podcast_audio = synthesize_podcast_audio(
# podcast_text=podcast_text,
# provider="groq"
# )
# print("Podcast Audio:")
# print(podcast_audio)