feat: Initial v0.9 release with API Key authentication
## v0.9.20260325_144654 ### Features - API Key Authentication System - Job Worker System - V2 Backup Versioning ### Bug Fixes - get_processor_results_by_job column mapping Co-authored-by: OpenCode
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
use super::types::{Chunk, ChunkType};
|
||||
use anyhow::Result;
|
||||
use super::types::{Chunk, ChunkRule, ChunkType};
|
||||
|
||||
pub struct ChunkSplitter {
|
||||
time_based_duration: f64,
|
||||
fps: f64,
|
||||
}
|
||||
|
||||
impl ChunkSplitter {
|
||||
pub fn new(time_based_duration_seconds: f64) -> Self {
|
||||
Self {
|
||||
time_based_duration: time_based_duration_seconds,
|
||||
fps: 24.0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +21,14 @@ impl ChunkSplitter {
|
||||
while current_time < duration {
|
||||
let end_time = (current_time + self.time_based_duration).min(duration);
|
||||
chunks.push(Chunk::new(
|
||||
0, // file_id
|
||||
uuid.to_string(),
|
||||
index,
|
||||
ChunkType::TimeBased,
|
||||
ChunkRule::Rule1,
|
||||
current_time,
|
||||
end_time,
|
||||
self.fps,
|
||||
serde_json::json!({
|
||||
"source": "time_based",
|
||||
"duration": self.time_based_duration,
|
||||
@@ -42,11 +46,14 @@ impl ChunkSplitter {
|
||||
|
||||
for (index, segment) in asr_segments.iter().enumerate() {
|
||||
chunks.push(Chunk::new(
|
||||
0, // file_id
|
||||
uuid.to_string(),
|
||||
index as u32,
|
||||
ChunkType::Sentence,
|
||||
ChunkRule::Rule1,
|
||||
segment.start,
|
||||
segment.end,
|
||||
self.fps,
|
||||
serde_json::json!({
|
||||
"text": segment.text,
|
||||
"speaker_id": segment.speaker_id,
|
||||
|
||||
Reference in New Issue
Block a user