Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
excerpt_types.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <string>
6
7namespace pulp::audio {
8
10 std::string text;
11 uint64_t window_frames = 0;
12 uint64_t hop_frames = 0;
13 std::size_t top_k = 5;
14 float min_score = 0.0f;
15};
16
18 std::string source_path;
19 uint32_t sample_rate = 0;
20 uint64_t start_frame = 0;
21 uint64_t frame_count = 0;
22
23 [[nodiscard]] uint64_t end_frame() const { return start_frame + frame_count; }
24 [[nodiscard]] double start_seconds() const {
25 return sample_rate == 0 ? 0.0 : static_cast<double>(start_frame) / static_cast<double>(sample_rate);
26 }
27 [[nodiscard]] double duration_seconds() const {
28 return sample_rate == 0 ? 0.0 : static_cast<double>(frame_count) / static_cast<double>(sample_rate);
29 }
30};
31
34 double score = 0.0;
35 std::string backend;
36 std::string model_id;
37};
38
40 std::string query_text;
41 std::size_t input_file_count = 0;
43 std::size_t enumerated_window_count = 0;
44 std::size_t ranked_candidate_count = 0;
45};
46
47} // namespace pulp::audio
Definition analyzer_provider.hpp:12
Definition excerpt_types.hpp:32
std::string backend
Definition excerpt_types.hpp:35
std::string model_id
Definition excerpt_types.hpp:36
double score
Definition excerpt_types.hpp:34
ExcerptWindow window
Definition excerpt_types.hpp:33
Definition excerpt_types.hpp:9
uint64_t hop_frames
Definition excerpt_types.hpp:12
uint64_t window_frames
Definition excerpt_types.hpp:11
std::string text
Definition excerpt_types.hpp:10
std::size_t top_k
Definition excerpt_types.hpp:13
float min_score
Definition excerpt_types.hpp:14
Definition excerpt_types.hpp:39
std::size_t enumerated_window_count
Definition excerpt_types.hpp:43
std::size_t input_file_count
Definition excerpt_types.hpp:41
std::size_t ranked_candidate_count
Definition excerpt_types.hpp:44
uint64_t total_frames_scanned
Definition excerpt_types.hpp:42
std::string query_text
Definition excerpt_types.hpp:40
Definition excerpt_types.hpp:17
double duration_seconds() const
Definition excerpt_types.hpp:27
uint64_t frame_count
Definition excerpt_types.hpp:21
double start_seconds() const
Definition excerpt_types.hpp:24
std::string source_path
Definition excerpt_types.hpp:18
uint32_t sample_rate
Definition excerpt_types.hpp:19
uint64_t start_frame
Definition excerpt_types.hpp:20
uint64_t end_frame() const
Definition excerpt_types.hpp:23