objc2_speech/generated/
SFTranscriptionSegment.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct SFTranscriptionSegment;
15);
16
17unsafe impl NSCoding for SFTranscriptionSegment {}
18
19unsafe impl NSCopying for SFTranscriptionSegment {}
20
21unsafe impl CopyingHelper for SFTranscriptionSegment {
22 type Result = Self;
23}
24
25unsafe impl NSObjectProtocol for SFTranscriptionSegment {}
26
27unsafe impl NSSecureCoding for SFTranscriptionSegment {}
28
29impl SFTranscriptionSegment {
30 extern_methods!(
31 #[unsafe(method(substring))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn substring(&self) -> Retained<NSString>;
34
35 #[unsafe(method(substringRange))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn substringRange(&self) -> NSRange;
38
39 #[unsafe(method(timestamp))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn timestamp(&self) -> NSTimeInterval;
42
43 #[unsafe(method(duration))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn duration(&self) -> NSTimeInterval;
46
47 #[unsafe(method(confidence))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn confidence(&self) -> c_float;
50
51 #[unsafe(method(alternativeSubstrings))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn alternativeSubstrings(&self) -> Retained<NSArray<NSString>>;
54
55 #[cfg(feature = "SFVoiceAnalytics")]
56 #[deprecated = "voiceAnalytics is moved to SFSpeechRecognitionMetadata"]
57 #[unsafe(method(voiceAnalytics))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn voiceAnalytics(&self) -> Option<Retained<SFVoiceAnalytics>>;
60 );
61}
62
63impl SFTranscriptionSegment {
65 extern_methods!(
66 #[unsafe(method(init))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}