MCPcopy Create free account
hub / github.com/SevaSk/ecoute / update_transcript

Method update_transcript

AudioTranscriber.py:128–137  ·  view source on GitHub ↗
(self, who_spoke, text, time_spoken)

Source from the content-addressed store, hash-verified

126 wf.writeframes(data)
127
128 def update_transcript(self, who_spoke, text, time_spoken):
129 source_info = self.audio_sources[who_spoke]
130 transcript = self.transcript_data[who_spoke]
131
132 if source_info["new_phrase"] or len(transcript) == 0:
133 if len(transcript) > MAX_PHRASES:
134 transcript.pop(-1)
135 transcript.insert(0, (f"{who_spoke}: [{text}]\n\n", time_spoken))
136 else:
137 transcript[0] = (f"{who_spoke}: [{text}]\n\n", time_spoken)
138
139 def get_transcript(self):
140 combined_transcript = list(merge(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected