[2f988f42] Moltbot hat das Tool kaputt gemacht. Habe es jetzt wieder mit Gemini CLI gefixt. Ist aber noch immer nicht ganz sauber - Optik ist kaputt, viele ja ja ja in der Transkription.

Moltbot hat das Tool kaputt gemacht. Habe es jetzt wieder mit Gemini CLI gefixt. Ist aber noch immer nicht ganz sauber - Optik ist kaputt, viele ja ja ja in der Transkription.
This commit is contained in:
2026-01-31 08:31:10 +00:00
parent 8e342d0f89
commit 41bca16d84
4 changed files with 76 additions and 4 deletions

View File

@@ -1 +1 @@
{"task_id": "2f988f42-8544-8100-9dba-e69ee2376730", "token": "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", "session_start_time": "2026-01-31T05:48:55.785384"}
{"task_id": "2f988f42-8544-81bc-97b2-ccd361f116a4", "token": "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", "session_start_time": "2026-01-31T08:29:52.360032"}

View File

@@ -190,7 +190,7 @@
<p>
Transkribieren Sie Meetings (MP3/WAV) mit automatischer Sprechererkennung und Timestamps via Gemini 2.0.
</p>
<a href="/tr/" class="btn">Starten &rarr;</a>
<a href="http://192.168.0.2:8001/tr/" class="btn">Starten &rarr;</a>
</div>
</div>

71
debug_meeting.py Normal file
View File

@@ -0,0 +1,71 @@
import sqlite3
import json
import os
DB_PATH = "transcription-tool/backend/meetings.db"
MEETING_ID = 5
def debug_meeting(db_path, meeting_id):
if not os.path.exists(db_path):
print(f"ERROR: Database file not found at {db_path}")
return
try:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Get Meeting Info
cursor.execute("SELECT id, title, status, duration_seconds FROM meetings WHERE id = ?", (meeting_id,))
meeting = cursor.fetchone()
if not meeting:
print(f"ERROR: No meeting found with ID {meeting_id}")
return
print("--- MEETING INFO ---")
print(f"ID: {meeting[0]}")
print(f"Title: {meeting[1]}")
print(f"Status: {meeting[2]}")
print(f"Duration (s): {meeting[3]}")
print("-" * 20)
# Get Chunks
cursor.execute("SELECT id, chunk_index, json_content FROM transcript_chunks WHERE meeting_id = ? ORDER BY chunk_index", (meeting_id,))
chunks = cursor.fetchall()
print(f"--- CHUNKS FOUND: {len(chunks)} ---")
for chunk in chunks:
chunk_id, chunk_index, json_content_str = chunk
print(f"\n--- Chunk ID: {chunk_id}, Index: {chunk_index} ---")
if not json_content_str:
print(" -> JSON content is EMPTY.")
continue
try:
json_content = json.loads(json_content_str)
print(f" -> Number of entries: {len(json_content)}")
if json_content:
# Print first 2 and last 2 entries to check for the "Ja" loop
print(" -> First 2 entries:")
for entry in json_content[:2]:
print(f" - {entry.get('display_time')} [{entry.get('speaker')}]: {entry.get('text')[:80]}...")
if len(json_content) > 4:
print(" -> Last 2 entries:")
for entry in json_content[-2:]:
print(f" - {entry.get('display_time')} [{entry.get('speaker')}]: {entry.get('text')[:80]}...")
except json.JSONDecodeError:
print(" -> ERROR: Failed to decode JSON content.")
except sqlite3.Error as e:
print(f"Database error: {e}")
finally:
if 'conn' in locals() and conn:
conn.close()
if __name__ == "__main__":
debug_meeting(DB_PATH, MEETING_ID)

View File

@@ -27,8 +27,9 @@ def call_gemini_api(prompt: str, temperature: float = 0.7, retries: int = 3, tim
logging.error("GEMINI_API_KEY environment variable not set.")
raise ValueError("API key not found.")
# Fallback to v1 (stable) and gemini-pro
url = f"https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent?key={api_key}"
# As per documentation, use the established v1beta endpoint and gemini-2.0-flash model
model_name = "gemini-2.0-flash"
url = f"https://generativelanguage.googleapis.com/v1beta/models/{model_name}:generateContent?key={api_key}"
headers = {'Content-Type': 'application/json'}
payload = {
"contents": [{