Mercurial > hg > piper
comparison capnp/piper.capnp @ 208:01b5abe6f170
Merge branch 'output-type-uri'
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 15 Jun 2017 09:51:16 +0100 |
parents | 0a482ae2525f |
children | 8923b382c055 |
comparison
equal
deleted
inserted
replaced
205:6a447d0318d3 | 208:01b5abe6f170 |
---|---|
41 # How returned features are spaced on the input timeline. | 41 # How returned features are spaced on the input timeline. |
42 | 42 |
43 oneSamplePerStep @0; # Each process input returns a feature aligned with that input's timestamp. | 43 oneSamplePerStep @0; # Each process input returns a feature aligned with that input's timestamp. |
44 fixedSampleRate @1; # Features are equally spaced at a given sample rate. | 44 fixedSampleRate @1; # Features are equally spaced at a given sample rate. |
45 variableSampleRate @2; # Features have their own individual timestamps. | 45 variableSampleRate @2; # Features have their own individual timestamps. |
46 } | |
47 | |
48 struct StaticOutputDescriptor { | |
49 | |
50 # Properties of an output, that is, a single stream of features | |
51 # produced in response to process and finish requests. A feature | |
52 # extractor may have any number of outputs, and it always | |
53 # calculates and returns features from all of them when | |
54 # processing; this is useful in cases where more than one feature | |
55 # can be easily calculated using a single method. | |
56 # | |
57 # This structure contains the properties of an output that are | |
58 # static, i.e. that do not depend on the parameter values provided | |
59 # at configuration, excluding the Basic struct parameters like id | |
60 # and description. The Basic struct properties are not included | |
61 # for historical reasons: they were already referenced separately | |
62 # in the OutputDescriptor and ExtractorStaticData before this | |
63 # struct was introduced. | |
64 | |
65 typeURI @0 :Text; # URI indicating the sort of feature that this output returns (see docs). | |
46 } | 66 } |
47 | 67 |
48 struct ConfiguredOutputDescriptor { | 68 struct ConfiguredOutputDescriptor { |
49 # Properties of an output, that is, a single stream of features produced | 69 # Properties of an output, that is, a single stream of features produced |
50 # in response to process and finish requests. A feature extractor may | 70 # in response to process and finish requests. A feature extractor may |
67 sampleRate @10 :Float32 = 0.0; # Sample rate (features per second) if sampleType == fixedSampleRate. | 87 sampleRate @10 :Float32 = 0.0; # Sample rate (features per second) if sampleType == fixedSampleRate. |
68 hasDuration @11 :Bool = false; # True if features returned from this output will have a duration. | 88 hasDuration @11 :Bool = false; # True if features returned from this output will have a duration. |
69 } | 89 } |
70 | 90 |
71 struct OutputDescriptor { | 91 struct OutputDescriptor { |
72 # All the properties of an output, both static (the basic metadata) and | 92 # All the properties of an output, both static (the basic metadata and static |
73 # potentially dependent on configuration parameters (the configured descriptor). | 93 # descriptor) and potentially dependent on configuration parameters (the |
94 # configured descriptor). | |
74 | 95 |
75 basic @0 :Basic; # Basic metadata about the output. | 96 basic @0 :Basic; # Basic metadata about the output. |
76 configured @1 :ConfiguredOutputDescriptor; # Properties of the output that may depend on configuration parameters. | 97 configured @1 :ConfiguredOutputDescriptor; # Properties of the output that may depend on configuration parameters. |
98 static @2 :StaticOutputDescriptor; # Properties (other than Basic) that do not depend on parameters. | |
77 } | 99 } |
78 | 100 |
79 enum InputDomain { | 101 enum InputDomain { |
80 # Whether a feature extractor requires time-domain audio input (i.e. | 102 # Whether a feature extractor requires time-domain audio input (i.e. |
81 # "normal" or "unprocessed" audio samples) or frequency-domain input | 103 # "normal" or "unprocessed" audio samples) or frequency-domain input |
100 maxChannelCount @7 :Int32; # Maximum number of input channels of audio this extractor can accept. | 122 maxChannelCount @7 :Int32; # Maximum number of input channels of audio this extractor can accept. |
101 parameters @8 :List(ParameterDescriptor); # List of configurable parameter properties for the feature extractor. | 123 parameters @8 :List(ParameterDescriptor); # List of configurable parameter properties for the feature extractor. |
102 programs @9 :List(Text); # List of predefined programs. For backward-compatibility, not recommended. | 124 programs @9 :List(Text); # List of predefined programs. For backward-compatibility, not recommended. |
103 inputDomain @10 :InputDomain; # Whether the extractor requires time-domain or frequency-domain input audio. | 125 inputDomain @10 :InputDomain; # Whether the extractor requires time-domain or frequency-domain input audio. |
104 basicOutputInfo @11 :List(Basic); # Basic metadata about all of the outputs of the extractor. | 126 basicOutputInfo @11 :List(Basic); # Basic metadata about all of the outputs of the extractor. |
127 | |
128 struct SOPair { | |
129 # A mapping between output identifier and static descriptor for | |
130 # that output. | |
131 | |
132 output @0 :Text; # Output id, matching the output's descriptor's basic identifier. | |
133 static @1 :StaticOutputDescriptor; | |
134 } | |
135 | |
136 staticOutputInfo @12 :List(SOPair); # Static descriptors for all outputs that have any static metadata. | |
105 } | 137 } |
106 | 138 |
107 struct RealTime { | 139 struct RealTime { |
108 # Time structure. When used as a timestamp, this is relative to "start | 140 # Time structure. When used as a timestamp, this is relative to "start |
109 # of audio". | 141 # of audio". |