diff --git a/server/index.js b/server/index.js index c6084b7..a07979c 100644 --- a/server/index.js +++ b/server/index.js @@ -2459,19 +2459,13 @@ Return ONLY the timestamped transcript, nothing else.`; } if (allEntries.length > 0) allEntries[allEntries.length - 1].duration = 15; - // Calculate total cost for chunked transcription - const rates = PRICING[modelName] || PRICING["default"]; - const totalCostNum = (totalIn / 1e6) * rates.input + (totalOut / 1e6) * rates.output; - const costDisplay = totalCostNum < 0.01 ? `$${(totalCostNum * 100).toFixed(3)}¢` : `$${totalCostNum.toFixed(4)}`; - logFn(`Chunked transcription complete: ${allEntries.length} total segments`); - logFn(`Total cost: ${totalIn.toLocaleString()} in / ${totalOut.toLocaleString()} out — cost: ${costDisplay}`); return { entries: allEntries, cost: { inputTokens: totalIn, outputTokens: totalOut, thinkingTokens: 0, totalTokens: totalIn + totalOut, - totalCost: String(totalCostNum), totalCostDisplay: costDisplay, + totalCost: "0", totalCostDisplay: "", }, }; } finally { @@ -2516,7 +2510,6 @@ Return ONLY the timestamped transcript, nothing else.`; txCost = calcCost(transcriptionModel, txUsage); const txTime = ((Date.now() - txStart) / 1000).toFixed(1); log(2, `Transcription complete in ${txTime}s`, `${transcriptText.length} chars received`); - log(2, `Transcription tokens: ${txCost.inputTokens.toLocaleString()} in / ${txCost.outputTokens.toLocaleString()} out${txCost.thinkingTokens ? ` / ${txCost.thinkingTokens.toLocaleString()} thinking` : ""} — cost: ${txCost.totalCostDisplay}`); entries = parseTimestampedTranscript(transcriptText); log(2, `Parsed ${entries.length} transcript segments`); @@ -2640,13 +2633,7 @@ Return ONLY the timestamped transcript, nothing else.`; const totalTime = ((Date.now() - pipelineStart) / 1000).toFixed(1); log(3, `Topic analysis complete in ${anaTime}s — found ${chunks.length} topics`); - log(3, `Analysis tokens: ${anaCost.inputTokens.toLocaleString()} in / ${anaCost.outputTokens.toLocaleString()} out${anaCost.thinkingTokens ? ` / ${anaCost.thinkingTokens.toLocaleString()} thinking` : ""} — cost: ${anaCost.totalCostDisplay}`); - - // Total cost summary - const totalCostNum = parseFloat(txCost.totalCost) + parseFloat(anaCost.totalCost); - const totalCostDisplay = totalCostNum < 0.01 ? `$${(totalCostNum * 100).toFixed(3)}¢` : `$${totalCostNum.toFixed(4)}`; - const totalTokens = (txCost.totalTokens + anaCost.totalTokens).toLocaleString(); - log(3, `Pipeline finished in ${totalTime}s — total cost: ${totalCostDisplay} (${totalTokens} tokens)`); + log(3, `Pipeline finished in ${totalTime}s`); // Save to history — skipped for free-tier users so we don't pollute // the host's library with anonymous summaries. The result still streams