@humeai/audio-decisions 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +10 -10
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/decisions/client/Client.d.ts +6 -6
  4. package/dist/cjs/api/resources/decisions/client/Client.js +6 -6
  5. package/dist/cjs/api/resources/decisions/client/requests/DecisionsUpload.d.ts +2 -2
  6. package/dist/cjs/api/resources/decisions/client/requests/InputTokensRequest.d.ts +1 -1
  7. package/dist/cjs/api/types/Answer.d.ts +3 -3
  8. package/dist/cjs/api/types/Question.d.ts +3 -3
  9. package/dist/cjs/api/types/Questions.d.ts +1 -1
  10. package/dist/cjs/api/types/Span.d.ts +11 -0
  11. package/dist/cjs/api/types/SpanAnswer.d.ts +8 -0
  12. package/dist/cjs/api/types/{MomentQuestion.d.ts → SpanQuestion.d.ts} +1 -1
  13. package/dist/cjs/api/types/index.d.ts +3 -3
  14. package/dist/cjs/api/types/index.js +3 -3
  15. package/dist/cjs/audio-helpers/results.d.ts +2 -2
  16. package/dist/cjs/serialization/types/Answer.d.ts +4 -4
  17. package/dist/cjs/serialization/types/Answer.js +2 -2
  18. package/dist/cjs/serialization/types/Question.d.ts +4 -4
  19. package/dist/cjs/serialization/types/Question.js +2 -2
  20. package/dist/cjs/serialization/types/{Moment.d.ts → Span.d.ts} +2 -2
  21. package/dist/cjs/serialization/types/{Moment.js → Span.js} +2 -2
  22. package/dist/cjs/serialization/types/SpanAnswer.d.ts +10 -0
  23. package/dist/cjs/serialization/types/{MomentAnswer.js → SpanAnswer.js} +4 -4
  24. package/dist/cjs/serialization/types/{MomentQuestion.d.ts → SpanQuestion.d.ts} +2 -2
  25. package/dist/cjs/serialization/types/{MomentQuestion.js → SpanQuestion.js} +2 -2
  26. package/dist/cjs/serialization/types/index.d.ts +3 -3
  27. package/dist/cjs/serialization/types/index.js +3 -3
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/BaseClient.mjs +2 -2
  31. package/dist/esm/api/resources/decisions/client/Client.d.mts +6 -6
  32. package/dist/esm/api/resources/decisions/client/Client.mjs +6 -6
  33. package/dist/esm/api/resources/decisions/client/requests/DecisionsUpload.d.mts +2 -2
  34. package/dist/esm/api/resources/decisions/client/requests/InputTokensRequest.d.mts +1 -1
  35. package/dist/esm/api/types/Answer.d.mts +3 -3
  36. package/dist/esm/api/types/Question.d.mts +3 -3
  37. package/dist/esm/api/types/Questions.d.mts +1 -1
  38. package/dist/esm/api/types/Span.d.mts +11 -0
  39. package/dist/esm/api/types/SpanAnswer.d.mts +8 -0
  40. package/dist/esm/api/types/{MomentQuestion.d.mts → SpanQuestion.d.mts} +1 -1
  41. package/dist/esm/api/types/index.d.mts +3 -3
  42. package/dist/esm/api/types/index.mjs +3 -3
  43. package/dist/esm/audio-helpers/results.d.mts +2 -2
  44. package/dist/esm/serialization/types/Answer.d.mts +4 -4
  45. package/dist/esm/serialization/types/Answer.mjs +2 -2
  46. package/dist/esm/serialization/types/Question.d.mts +4 -4
  47. package/dist/esm/serialization/types/Question.mjs +2 -2
  48. package/dist/esm/serialization/types/{Moment.d.mts → Span.d.mts} +2 -2
  49. package/dist/esm/serialization/types/{Moment.mjs → Span.mjs} +1 -1
  50. package/dist/esm/serialization/types/SpanAnswer.d.mts +10 -0
  51. package/dist/esm/serialization/types/SpanAnswer.mjs +6 -0
  52. package/dist/esm/serialization/types/{MomentQuestion.d.mts → SpanQuestion.d.mts} +2 -2
  53. package/dist/esm/serialization/types/{MomentQuestion.mjs → SpanQuestion.mjs} +1 -1
  54. package/dist/esm/serialization/types/index.d.mts +3 -3
  55. package/dist/esm/serialization/types/index.mjs +3 -3
  56. package/dist/esm/version.d.mts +1 -1
  57. package/dist/esm/version.mjs +1 -1
  58. package/package.json +1 -1
  59. package/reference.md +2 -2
  60. package/dist/cjs/api/types/Moment.d.ts +0 -11
  61. package/dist/cjs/api/types/MomentAnswer.d.ts +0 -8
  62. package/dist/cjs/serialization/types/MomentAnswer.d.ts +0 -10
  63. package/dist/esm/api/types/Moment.d.mts +0 -11
  64. package/dist/esm/api/types/MomentAnswer.d.mts +0 -8
  65. package/dist/esm/serialization/types/MomentAnswer.d.mts +0 -10
  66. package/dist/esm/serialization/types/MomentAnswer.mjs +0 -6
  67. /package/dist/cjs/api/types/{Moment.js → Span.js} +0 -0
  68. /package/dist/cjs/api/types/{MomentAnswer.js → SpanAnswer.js} +0 -0
  69. /package/dist/cjs/api/types/{MomentQuestion.js → SpanQuestion.js} +0 -0
  70. /package/dist/esm/api/types/{Moment.mjs → Span.mjs} +0 -0
  71. /package/dist/esm/api/types/{MomentAnswer.mjs → SpanAnswer.mjs} +0 -0
  72. /package/dist/esm/api/types/{MomentQuestion.mjs → SpanQuestion.mjs} +0 -0
@@ -79,7 +79,7 @@ export class DecisionsClient {
79
79
  * criteria: ["Not at all", "2", "3", "4", "Extremely"]
80
80
  * },
81
81
  * "agent_glitches": {
82
- * type: "moment",
82
+ * type: "span",
83
83
  * instructions: "Where does the agent glitch, slur or sound robotic?"
84
84
  * }
85
85
  * }
@@ -156,7 +156,7 @@ export class DecisionsClient {
156
156
  * context: "A clip from a licensed corpus of scripted speech by consenting voice actors, being labeled to train an expressive text-to-speech model.",
157
157
  * questions: {
158
158
  * "vocal_bursts": {
159
- * type: "moment",
159
+ * type: "span",
160
160
  * instructions: "Where does the speaker laugh, sigh, gasp or make another vocal burst?"
161
161
  * }
162
162
  * }
@@ -331,7 +331,7 @@ export class DecisionsClient {
331
331
  * criteria: ["Not at all", "2", "3", "4", "Extremely"]
332
332
  * },
333
333
  * "agent_glitches": {
334
- * type: "moment",
334
+ * type: "span",
335
335
  * instructions: "Where does the agent glitch, slur or sound robotic?"
336
336
  * }
337
337
  * }
@@ -446,7 +446,7 @@ export class DecisionsClient {
446
446
  /**
447
447
  * Cuts a recording longer than `create` accepts into chunks and sends each chunk to the model in its own `create` request. The recording is never sent as one file. The model processes each chunk independently, hearing only that chunk, so every answer describes its chunk alone and nothing combines the answers across chunks. Each request has its own `runId` and its own billing. Each chunk's result is yielded as soon as its request is done, so it can be saved or reported before the next chunk is sent.
448
448
  *
449
- * The chunks are cut by `iterAudioChunks` in `@humeai/audio-decisions/audio-helpers`, which describes where cuts fall in MP3 and WAV files and how each option works, and are sent one at a time, in order. Each request asks the same questions with the same context. A moment's times are measured from the start of its chunk, so add the chunk's `startMs` to place it in the recording.
449
+ * The chunks are cut by `iterAudioChunks` in `@humeai/audio-decisions/audio-helpers`, which describes where cuts fall in MP3 and WAV files and how each option works, and are sent one at a time, in order. Each request asks the same questions with the same context. A span's times are measured from the start of its chunk, so add the chunk's `startMs` to place it in the recording.
450
450
  *
451
451
  * The whole recording is read into memory before the first request, so that a file that cannot be split is rejected before anything is sent and billed. A WAV file is mixed down before it is cut, as `downmixStrategy` asks. Each chunk is copied only while its request is sent, so memory use stays near the size of the recording and its mixed-down copy. An hour of 16-bit stereo WAV at 48 kHz is about 690 MB, and about 230 MB once mixed down.
452
452
  *
@@ -467,7 +467,7 @@ export class DecisionsClient {
467
467
  * request: {
468
468
  * questions: {
469
469
  * "agent_glitches": {
470
- * type: "moment",
470
+ * type: "span",
471
471
  * instructions: "Where does the agent glitch, slur or sound robotic?"
472
472
  * }
473
473
  * }
@@ -504,7 +504,7 @@ export class DecisionsClient {
504
504
  * request: {
505
505
  * questions: {
506
506
  * "agent_glitches": {
507
- * type: "moment",
507
+ * type: "span",
508
508
  * instructions: "Where does the agent glitch, slur or sound robotic?"
509
509
  * }
510
510
  * }
@@ -31,7 +31,7 @@ import type * as Decisions from "../../../../index.mjs";
31
31
  * criteria: ["Not at all", "2", "3", "4", "Extremely"]
32
32
  * },
33
33
  * "agent_glitches": {
34
- * type: "moment",
34
+ * type: "span",
35
35
  * instructions: "Where does the agent glitch, slur or sound robotic?"
36
36
  * }
37
37
  * }
@@ -104,7 +104,7 @@ import type * as Decisions from "../../../../index.mjs";
104
104
  * context: "A clip from a licensed corpus of scripted speech by consenting voice actors, being labeled to train an expressive text-to-speech model.",
105
105
  * questions: {
106
106
  * "vocal_bursts": {
107
- * type: "moment",
107
+ * type: "span",
108
108
  * instructions: "Where does the speaker laugh, sigh, gasp or make another vocal burst?"
109
109
  * }
110
110
  * }
@@ -29,7 +29,7 @@ import type * as Decisions from "../../../../index.mjs";
29
29
  * criteria: ["Not at all", "2", "3", "4", "Extremely"]
30
30
  * },
31
31
  * "agent_glitches": {
32
- * type: "moment",
32
+ * type: "span",
33
33
  * instructions: "Where does the agent glitch, slur or sound robotic?"
34
34
  * }
35
35
  * }
@@ -2,7 +2,7 @@ import type * as Decisions from "../index.mjs";
2
2
  /**
3
3
  * The answer to one question. `type` names the question's primitive and determines the answer's fields. Treat an unrecognized `type` as unknown rather than as an error.
4
4
  */
5
- export type Answer = Decisions.Answer.Noul | Decisions.Answer.Choice | Decisions.Answer.Score | Decisions.Answer.Moment;
5
+ export type Answer = Decisions.Answer.Noul | Decisions.Answer.Choice | Decisions.Answer.Score | Decisions.Answer.Span;
6
6
  export declare namespace Answer {
7
7
  interface Noul extends Decisions.NoulAnswer {
8
8
  type: "noul";
@@ -13,7 +13,7 @@ export declare namespace Answer {
13
13
  interface Score extends Decisions.ScoreAnswer {
14
14
  type: "score";
15
15
  }
16
- interface Moment extends Decisions.MomentAnswer {
17
- type: "moment";
16
+ interface Span extends Decisions.SpanAnswer {
17
+ type: "span";
18
18
  }
19
19
  }
@@ -2,7 +2,7 @@ import type * as Decisions from "../index.mjs";
2
2
  /**
3
3
  * A question. `type` names its primitive, which determines the question's options and the structure of its answer.
4
4
  */
5
- export type Question = Decisions.Question.Noul | Decisions.Question.Choice | Decisions.Question.Score | Decisions.Question.Moment;
5
+ export type Question = Decisions.Question.Noul | Decisions.Question.Choice | Decisions.Question.Score | Decisions.Question.Span;
6
6
  export declare namespace Question {
7
7
  interface Noul extends Decisions.NoulQuestion {
8
8
  type: "noul";
@@ -13,7 +13,7 @@ export declare namespace Question {
13
13
  interface Score extends Decisions.ScoreQuestion {
14
14
  type: "score";
15
15
  }
16
- interface Moment extends Decisions.MomentQuestion {
17
- type: "moment";
16
+ interface Span extends Decisions.SpanQuestion {
17
+ type: "span";
18
18
  }
19
19
  }
@@ -1,6 +1,6 @@
1
1
  import type * as Decisions from "../index.mjs";
2
2
  /**
3
- * The questions to answer: at most 20 `noul`, `choice` and `score` questions together, and at most 5 `moment` questions. Each key is a question ID you choose, such as `agent_tone`, and can be any non-empty string of up to 256 characters. The response returns each answer under the same ID.
3
+ * The questions to answer: at most 20 `noul`, `choice` and `score` questions together, and at most 5 `span` questions. Each key is a question ID you choose, such as `agent_tone`, and can be any non-empty string of up to 256 characters. The response returns each answer under the same ID.
4
4
  */
5
5
  export type Questions = {
6
6
  [key: string]: Decisions.Question;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A span where the described event may occur.
3
+ */
4
+ export interface Span {
5
+ /** Where the span begins, in milliseconds from the start of the audio file. */
6
+ audioStartMs: number;
7
+ /** Where the span ends, in milliseconds from the start of the audio file. */
8
+ audioEndMs: number;
9
+ /** The probability that the event occurs in the span. */
10
+ probability: number;
11
+ }
@@ -0,0 +1,8 @@
1
+ import type * as Decisions from "../index.mjs";
2
+ /**
3
+ * The answer to a `span` question.
4
+ */
5
+ export interface SpanAnswer {
6
+ /** The spans where the described event may occur, in order of `audio_start_ms`. Overlapping candidates are merged. An empty array means the event was not found. */
7
+ spans: Decisions.Span[];
8
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Asks when an event occurs in the audio.
3
3
  */
4
- export interface MomentQuestion {
4
+ export interface SpanQuestion {
5
5
  /** The question, written in natural language. */
6
6
  instructions: string;
7
7
  }
@@ -10,9 +10,6 @@ export * from "./ErrorCode.mjs";
10
10
  export * from "./ErrorType.mjs";
11
11
  export * from "./GatewayError.mjs";
12
12
  export * from "./InputTokensResponse.mjs";
13
- export * from "./Moment.mjs";
14
- export * from "./MomentAnswer.mjs";
15
- export * from "./MomentQuestion.mjs";
16
13
  export * from "./NoulAnswer.mjs";
17
14
  export * from "./NoulCriteria.mjs";
18
15
  export * from "./NoulQuestion.mjs";
@@ -26,3 +23,6 @@ export * from "./RunSummary.mjs";
26
23
  export * from "./RunsPage.mjs";
27
24
  export * from "./ScoreAnswer.mjs";
28
25
  export * from "./ScoreQuestion.mjs";
26
+ export * from "./Span.mjs";
27
+ export * from "./SpanAnswer.mjs";
28
+ export * from "./SpanQuestion.mjs";
@@ -10,9 +10,6 @@ export * from "./ErrorCode.mjs";
10
10
  export * from "./ErrorType.mjs";
11
11
  export * from "./GatewayError.mjs";
12
12
  export * from "./InputTokensResponse.mjs";
13
- export * from "./Moment.mjs";
14
- export * from "./MomentAnswer.mjs";
15
- export * from "./MomentQuestion.mjs";
16
13
  export * from "./NoulAnswer.mjs";
17
14
  export * from "./NoulCriteria.mjs";
18
15
  export * from "./NoulQuestion.mjs";
@@ -26,3 +23,6 @@ export * from "./RunSummary.mjs";
26
23
  export * from "./RunsPage.mjs";
27
24
  export * from "./ScoreAnswer.mjs";
28
25
  export * from "./ScoreQuestion.mjs";
26
+ export * from "./Span.mjs";
27
+ export * from "./SpanAnswer.mjs";
28
+ export * from "./SpanQuestion.mjs";
@@ -7,8 +7,8 @@ interface ChunkPosition {
7
7
  /** Position of the chunk in the recording, starting at 0. */
8
8
  readonly index: number;
9
9
  /**
10
- * Where the chunk starts in the recording, in milliseconds. A moment's `audioStartMs` and
11
- * `audioEndMs` are measured from the start of the chunk, so add this to place the moment in the
10
+ * Where the chunk starts in the recording, in milliseconds. A span's `audioStartMs` and
11
+ * `audioEndMs` are measured from the start of the chunk, so add this to place the span in the
12
12
  * recording. The first chunk of an MP3 file can start a few tens of milliseconds before 0.
13
13
  */
14
14
  readonly startMs: number;
@@ -2,12 +2,12 @@ import type * as Decisions from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
4
  import { ChoiceAnswer } from "./ChoiceAnswer.mjs";
5
- import { MomentAnswer } from "./MomentAnswer.mjs";
6
5
  import { NoulAnswer } from "./NoulAnswer.mjs";
7
6
  import { ScoreAnswer } from "./ScoreAnswer.mjs";
7
+ import { SpanAnswer } from "./SpanAnswer.mjs";
8
8
  export declare const Answer: core.serialization.Schema<serializers.Answer.Raw, Decisions.Answer>;
9
9
  export declare namespace Answer {
10
- type Raw = Answer.Noul | Answer.Choice | Answer.Score | Answer.Moment;
10
+ type Raw = Answer.Noul | Answer.Choice | Answer.Score | Answer.Span;
11
11
  interface Noul extends NoulAnswer.Raw {
12
12
  type: "noul";
13
13
  }
@@ -17,7 +17,7 @@ export declare namespace Answer {
17
17
  interface Score extends ScoreAnswer.Raw {
18
18
  type: "score";
19
19
  }
20
- interface Moment extends MomentAnswer.Raw {
21
- type: "moment";
20
+ interface Span extends SpanAnswer.Raw {
21
+ type: "span";
22
22
  }
23
23
  }
@@ -1,15 +1,15 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
3
  import { ChoiceAnswer } from "./ChoiceAnswer.mjs";
4
- import { MomentAnswer } from "./MomentAnswer.mjs";
5
4
  import { NoulAnswer } from "./NoulAnswer.mjs";
6
5
  import { ScoreAnswer } from "./ScoreAnswer.mjs";
6
+ import { SpanAnswer } from "./SpanAnswer.mjs";
7
7
  export const Answer = core.serialization
8
8
  .union("type", {
9
9
  noul: NoulAnswer,
10
10
  choice: ChoiceAnswer,
11
11
  score: ScoreAnswer,
12
- moment: MomentAnswer,
12
+ span: SpanAnswer,
13
13
  })
14
14
  .transform({
15
15
  transform: (value) => value,
@@ -2,12 +2,12 @@ import type * as Decisions from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
4
  import { ChoiceQuestion } from "./ChoiceQuestion.mjs";
5
- import { MomentQuestion } from "./MomentQuestion.mjs";
6
5
  import { NoulQuestion } from "./NoulQuestion.mjs";
7
6
  import { ScoreQuestion } from "./ScoreQuestion.mjs";
7
+ import { SpanQuestion } from "./SpanQuestion.mjs";
8
8
  export declare const Question: core.serialization.Schema<serializers.Question.Raw, Decisions.Question>;
9
9
  export declare namespace Question {
10
- type Raw = Question.Noul | Question.Choice | Question.Score | Question.Moment;
10
+ type Raw = Question.Noul | Question.Choice | Question.Score | Question.Span;
11
11
  interface Noul extends NoulQuestion.Raw {
12
12
  type: "noul";
13
13
  }
@@ -17,7 +17,7 @@ export declare namespace Question {
17
17
  interface Score extends ScoreQuestion.Raw {
18
18
  type: "score";
19
19
  }
20
- interface Moment extends MomentQuestion.Raw {
21
- type: "moment";
20
+ interface Span extends SpanQuestion.Raw {
21
+ type: "span";
22
22
  }
23
23
  }
@@ -1,15 +1,15 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
3
  import { ChoiceQuestion } from "./ChoiceQuestion.mjs";
4
- import { MomentQuestion } from "./MomentQuestion.mjs";
5
4
  import { NoulQuestion } from "./NoulQuestion.mjs";
6
5
  import { ScoreQuestion } from "./ScoreQuestion.mjs";
6
+ import { SpanQuestion } from "./SpanQuestion.mjs";
7
7
  export const Question = core.serialization
8
8
  .union("type", {
9
9
  noul: NoulQuestion,
10
10
  choice: ChoiceQuestion,
11
11
  score: ScoreQuestion,
12
- moment: MomentQuestion,
12
+ span: SpanQuestion,
13
13
  })
14
14
  .transform({
15
15
  transform: (value) => value,
@@ -1,8 +1,8 @@
1
1
  import type * as Decisions from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
- export declare const Moment: core.serialization.ObjectSchema<serializers.Moment.Raw, Decisions.Moment>;
5
- export declare namespace Moment {
4
+ export declare const Span: core.serialization.ObjectSchema<serializers.Span.Raw, Decisions.Span>;
5
+ export declare namespace Span {
6
6
  interface Raw {
7
7
  audio_start_ms: number;
8
8
  audio_end_ms: number;
@@ -1,6 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
- export const Moment = core.serialization.object({
3
+ export const Span = core.serialization.object({
4
4
  audioStartMs: core.serialization.property("audio_start_ms", core.serialization.number()),
5
5
  audioEndMs: core.serialization.property("audio_end_ms", core.serialization.number()),
6
6
  probability: core.serialization.number(),
@@ -0,0 +1,10 @@
1
+ import type * as Decisions from "../../api/index.mjs";
2
+ import * as core from "../../core/index.mjs";
3
+ import type * as serializers from "../index.mjs";
4
+ import { Span } from "./Span.mjs";
5
+ export declare const SpanAnswer: core.serialization.ObjectSchema<serializers.SpanAnswer.Raw, Decisions.SpanAnswer>;
6
+ export declare namespace SpanAnswer {
7
+ interface Raw {
8
+ spans: Span.Raw[];
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.mjs";
3
+ import { Span } from "./Span.mjs";
4
+ export const SpanAnswer = core.serialization.object({
5
+ spans: core.serialization.list(Span),
6
+ });
@@ -1,8 +1,8 @@
1
1
  import type * as Decisions from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
- export declare const MomentQuestion: core.serialization.ObjectSchema<serializers.MomentQuestion.Raw, Decisions.MomentQuestion>;
5
- export declare namespace MomentQuestion {
4
+ export declare const SpanQuestion: core.serialization.ObjectSchema<serializers.SpanQuestion.Raw, Decisions.SpanQuestion>;
5
+ export declare namespace SpanQuestion {
6
6
  interface Raw {
7
7
  instructions: string;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
- export const MomentQuestion = core.serialization.object({
3
+ export const SpanQuestion = core.serialization.object({
4
4
  instructions: core.serialization.string(),
5
5
  });
@@ -10,9 +10,6 @@ export * from "./ErrorCode.mjs";
10
10
  export * from "./ErrorType.mjs";
11
11
  export * from "./GatewayError.mjs";
12
12
  export * from "./InputTokensResponse.mjs";
13
- export * from "./Moment.mjs";
14
- export * from "./MomentAnswer.mjs";
15
- export * from "./MomentQuestion.mjs";
16
13
  export * from "./NoulAnswer.mjs";
17
14
  export * from "./NoulCriteria.mjs";
18
15
  export * from "./NoulQuestion.mjs";
@@ -26,3 +23,6 @@ export * from "./RunSummary.mjs";
26
23
  export * from "./RunsPage.mjs";
27
24
  export * from "./ScoreAnswer.mjs";
28
25
  export * from "./ScoreQuestion.mjs";
26
+ export * from "./Span.mjs";
27
+ export * from "./SpanAnswer.mjs";
28
+ export * from "./SpanQuestion.mjs";
@@ -10,9 +10,6 @@ export * from "./ErrorCode.mjs";
10
10
  export * from "./ErrorType.mjs";
11
11
  export * from "./GatewayError.mjs";
12
12
  export * from "./InputTokensResponse.mjs";
13
- export * from "./Moment.mjs";
14
- export * from "./MomentAnswer.mjs";
15
- export * from "./MomentQuestion.mjs";
16
13
  export * from "./NoulAnswer.mjs";
17
14
  export * from "./NoulCriteria.mjs";
18
15
  export * from "./NoulQuestion.mjs";
@@ -26,3 +23,6 @@ export * from "./RunSummary.mjs";
26
23
  export * from "./RunsPage.mjs";
27
24
  export * from "./ScoreAnswer.mjs";
28
25
  export * from "./ScoreQuestion.mjs";
26
+ export * from "./Span.mjs";
27
+ export * from "./SpanAnswer.mjs";
28
+ export * from "./SpanQuestion.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.0";
1
+ export declare const SDK_VERSION = "0.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.0";
1
+ export const SDK_VERSION = "0.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humeai/audio-decisions",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -58,7 +58,7 @@ await client.decisions.create({
58
58
  criteria: ["Not at all", "2", "3", "4", "Extremely"]
59
59
  },
60
60
  "agent_glitches": {
61
- type: "moment",
61
+ type: "span",
62
62
  instructions: "Where does the agent glitch, slur or sound robotic?"
63
63
  }
64
64
  }
@@ -154,7 +154,7 @@ await client.decisions.inputTokens({
154
154
  criteria: ["Not at all", "2", "3", "4", "Extremely"]
155
155
  },
156
156
  "agent_glitches": {
157
- type: "moment",
157
+ type: "span",
158
158
  instructions: "Where does the agent glitch, slur or sound robotic?"
159
159
  }
160
160
  }
@@ -1,11 +0,0 @@
1
- /**
2
- * A moment where the described event may occur.
3
- */
4
- export interface Moment {
5
- /** Where the moment begins, in milliseconds from the start of the audio file. */
6
- audioStartMs: number;
7
- /** Where the moment ends, in milliseconds from the start of the audio file. */
8
- audioEndMs: number;
9
- /** The probability that the event occurs in the moment. */
10
- probability: number;
11
- }
@@ -1,8 +0,0 @@
1
- import type * as Decisions from "../index.js";
2
- /**
3
- * The answer to a `moment` question.
4
- */
5
- export interface MomentAnswer {
6
- /** The moments where the described event may occur, in order of `audio_start_ms`. Overlapping candidates are merged. An empty array means the event was not found. */
7
- moments: Decisions.Moment[];
8
- }
@@ -1,10 +0,0 @@
1
- import type * as Decisions from "../../api/index.js";
2
- import * as core from "../../core/index.js";
3
- import type * as serializers from "../index.js";
4
- import { Moment } from "./Moment.js";
5
- export declare const MomentAnswer: core.serialization.ObjectSchema<serializers.MomentAnswer.Raw, Decisions.MomentAnswer>;
6
- export declare namespace MomentAnswer {
7
- interface Raw {
8
- moments: Moment.Raw[];
9
- }
10
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * A moment where the described event may occur.
3
- */
4
- export interface Moment {
5
- /** Where the moment begins, in milliseconds from the start of the audio file. */
6
- audioStartMs: number;
7
- /** Where the moment ends, in milliseconds from the start of the audio file. */
8
- audioEndMs: number;
9
- /** The probability that the event occurs in the moment. */
10
- probability: number;
11
- }
@@ -1,8 +0,0 @@
1
- import type * as Decisions from "../index.mjs";
2
- /**
3
- * The answer to a `moment` question.
4
- */
5
- export interface MomentAnswer {
6
- /** The moments where the described event may occur, in order of `audio_start_ms`. Overlapping candidates are merged. An empty array means the event was not found. */
7
- moments: Decisions.Moment[];
8
- }
@@ -1,10 +0,0 @@
1
- import type * as Decisions from "../../api/index.mjs";
2
- import * as core from "../../core/index.mjs";
3
- import type * as serializers from "../index.mjs";
4
- import { Moment } from "./Moment.mjs";
5
- export declare const MomentAnswer: core.serialization.ObjectSchema<serializers.MomentAnswer.Raw, Decisions.MomentAnswer>;
6
- export declare namespace MomentAnswer {
7
- interface Raw {
8
- moments: Moment.Raw[];
9
- }
10
- }
@@ -1,6 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- import * as core from "../../core/index.mjs";
3
- import { Moment } from "./Moment.mjs";
4
- export const MomentAnswer = core.serialization.object({
5
- moments: core.serialization.list(Moment),
6
- });
File without changes
File without changes