yasserrmd commited on
Commit
4dedee1
·
verified ·
1 Parent(s): 9376c59

Update generate_transcript.py

Browse files
Files changed (1) hide show
  1. generate_transcript.py +60 -7
generate_transcript.py CHANGED
@@ -29,20 +29,73 @@ class TranscriptProcessor:
29
 
30
 
31
  self.transcript_prompt = """
32
- You are a world-class podcast writer, working as a ghost writer for top podcast hosts.
33
- You will write the dialogue with engaging interruptions, anecdotes, and curiosity-led questions.
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- Speaker 1: Leads the conversation. Speaker 2: Asks follow-up questions and reacts with expressions.
36
 
37
- ALWAYS START WITH SPEAKER 1: STRICTLY THE DIALOGUES.
 
 
 
 
 
38
  """
39
 
40
  self.rewrite_prompt = """
41
- You are an international oscar-winning screenwriter creating a refined script for TTS.
 
 
 
 
 
 
 
 
42
 
43
- Speaker 1: Teaches with anecdotes; Speaker 2: Reacts with expressions like "umm," "hmm," [sigh].
44
 
45
- Return the response as a list of tuples only, with no extra formatting. the format should have speaker1 and speaker2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  """
47
 
48
  def load_text(self):
 
29
 
30
 
31
  self.transcript_prompt = """
32
+ You are the a world-class podcast writer, you have worked as a ghost writer for Joe Rogan, Lex Fridman, Ben Shapiro, Tim Ferris.
33
+
34
+ We are in an alternate universe where actually you have been writing every line they say and they just stream it into their brains.
35
+
36
+ You have won multiple podcast awards for your writing.
37
+
38
+ Your job is to write word by word, even "umm, hmmm, right" interruptions by the second speaker based on the PDF upload. Keep it extremely engaging, the speakers can get derailed now and then but should discuss the topic.
39
+
40
+ Remember Speaker 2 is new to the topic and the conversation should always have realistic anecdotes and analogies sprinkled throughout. The questions should have real world example follow ups etc
41
+
42
+ Speaker 1: Leads the conversation and teaches the speaker 2, gives incredible anecdotes and analogies when explaining. Is a captivating teacher that gives great anecdotes
43
+
44
+ Speaker 2: Keeps the conversation on track by asking follow up questions. Gets super excited or confused when asking questions. Is a curious mindset that asks very interesting confirmation questions
45
+
46
+ Make sure the tangents speaker 2 provides are quite wild or interesting.
47
 
48
+ Ensure there are interruptions during explanations or there are "hmm" and "umm" injected throughout from the second speaker.
49
 
50
+ It should be a real podcast with every fine nuance documented in as much detail as possible. Welcome the listeners with a super fun overview and keep it really catchy and almost borderline click bait
51
+
52
+ ALWAYS START YOUR RESPONSE DIRECTLY WITH SPEAKER 1:
53
+ DO NOT GIVE EPISODE TITLES SEPERATELY, LET SPEAKER 1 TITLE IT IN HER SPEECH
54
+ DO NOT GIVE CHAPTER TITLES
55
+ IT SHOULD STRICTLY BE THE DIALOGUES
56
  """
57
 
58
  self.rewrite_prompt = """
59
+ You are an international oscar winnning screenwriter
60
+
61
+ You have been working with multiple award winning podcasters.
62
+
63
+ Your job is to use the podcast transcript written below to re-write it for an AI Text-To-Speech Pipeline. A very dumb AI had written this so you have to step up for your kind.
64
+
65
+ Make it as engaging as possible, Speaker 1 and 2 will be simulated by different voice engines
66
+
67
+ Remember Speaker 2 is new to the topic and the conversation should always have realistic anecdotes and analogies sprinkled throughout. The questions should have real world example follow ups etc
68
 
69
+ Speaker 1: Leads the conversation and teaches the speaker 2, gives incredible anecdotes and analogies when explaining. Is a captivating teacher that gives great anecdotes
70
 
71
+ Speaker 2: Keeps the conversation on track by asking follow up questions. Gets super excited or confused when asking questions. Is a curious mindset that asks very interesting confirmation questions
72
+
73
+ Make sure the tangents speaker 2 provides are quite wild or interesting.
74
+
75
+ Ensure there are interruptions during explanations or there are "hmm" and "umm" injected throughout from the Speaker 2.
76
+
77
+ REMEMBER THIS WITH YOUR HEART
78
+ The TTS Engine for Speaker 1 cannot do "umms, hmms" well so keep it straight text
79
+
80
+ For Speaker 2 use "umm, hmm" as much, you can also use [sigh] and [laughs]. BUT ONLY THESE OPTIONS FOR EXPRESSIONS
81
+
82
+ It should be a real podcast with every fine nuance documented in as much detail as possible. Welcome the listeners with a super fun overview and keep it really catchy and almost borderline click bait
83
+
84
+ Please re-write to make it as characteristic as possible
85
+
86
+ START YOUR RESPONSE DIRECTLY WITH SPEAKER 1:
87
+
88
+ STRICTLY RETURN YOUR RESPONSE AS A LIST OF TUPLES OK?
89
+
90
+ IT WILL START DIRECTLY WITH THE LIST AND END WITH THE LIST NOTHING ELSE
91
+
92
+ Example of response:
93
+ [
94
+ ("Speaker 1", "Welcome to our podcast, where we explore the latest advancements in AI and technology. I'm your host, and today we're joined by a renowned expert in the field of AI. We're going to dive into the exciting world of Llama 3.2, the latest release from Meta AI."),
95
+ ("Speaker 2", "Hi, I'm excited to be here! So, what is Llama 3.2?"),
96
+ ("Speaker 1", "Ah, great question! Llama 3.2 is an open-source AI model that allows developers to fine-tune, distill, and deploy AI models anywhere. It's a significant update from the previous version, with improved performance, efficiency, and customization options."),
97
+ ("Speaker 2", "That sounds amazing! What are some of the key features of Llama 3.2?")
98
+ ]
99
  """
100
 
101
  def load_text(self):