Ses ve Video Promptları
Whisper ile audio transcription, video frame extraction, multi-modal pipelines. Toplantı transkriptleri, podcast özeti.
Şükrü Yusuf KAYA
9 dakikalık okuma
İleriSes ve Video Promptları
Audio: Whisper Pipeline#
python
from openai import OpenAIclient = OpenAI() # 1. Transcriptwith open("toplanti.mp3", "rb") as f: transcript = client.audio.transcriptions.create( model="whisper-1", file=f, language="tr", response_format="verbose_json", timestamp_granularities=["segment"] ) # 2. Speaker diarization (ayrı tool — pyannote, AssemblyAI)# 3. LLM ile özet/aksiyon from anthropic import Anthropicant = Anthropic() r = ant.messages.create( model="claude-sonnet-4-6", max_tokens=2000, messages=[{ "role": "user", "content": f"""Aşağıdaki Türkçe toplantı transkriptinden: {transcript.text} Çıktı:# Özet (3 cümle)## Alınan Kararlar- ...## Action Items- [ ] [iş] - [sorumlu] - [tarih]## Açık Sorular- ...""" }])print(r.content[0].text)Audio → transcript → LLM özet
Video: Frame + Audio#
Video'dan kilit frame'ler:
import cv2 cap = cv2.VideoCapture("video.mp4") fps = cap.get(cv2.CAP_PROP_FPS) total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) # Her 5 saniyede 1 frame key_frames = [] for i in range(0, total, int(fps * 5)): cap.set(cv2.CAP_PROP_POS_FRAMES, i) ret, frame = cap.read() if ret: key_frames.append(frame)
Pipeline: Video → frame'ler + audio → frames description (vision LLM) + audio transcript → final synthesis.
Yorumlar & Soru-Cevap
(0)Yorum yazmak için giriş yap.
Yorumlar yükleniyor...
İlgili İçerikler
1. Temeller — Yapay Zekâ ve LLM'lere Giriş
Bu Eğitim Hakkında ve Verimli Çalışma Yöntemi
Öğrenmeye Başla1. Temeller — Yapay Zekâ ve LLM'lere Giriş
Yapay Zekâ → Üretken AI → LLM: Bağlamsal Harita
Öğrenmeye Başla1. Temeller — Yapay Zekâ ve LLM'lere Giriş