-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transcript message in flow client (#81)
Add transcript message. Copy across types from realtime client for now.
- Loading branch information
Showing
11 changed files
with
1,841 additions
and
1,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// NOTE: This file is copied from realtime-client, not auto-generated | ||
|
||
import type { RecognitionMetadata } from '../models'; | ||
import type { RecognitionResult } from '../models'; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface AddTranscript | ||
*/ | ||
export interface AddTranscript { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof AddTranscript | ||
*/ | ||
message: AddTranscriptMessageEnum; | ||
/** | ||
* Speechmatics JSON output format version number. | ||
* @type {string} | ||
* @memberof AddTranscript | ||
*/ | ||
format?: string; | ||
/** | ||
* | ||
* @type {RecognitionMetadata} | ||
* @memberof AddTranscript | ||
*/ | ||
metadata: RecognitionMetadata; | ||
/** | ||
* | ||
* @type {Array<RecognitionResult>} | ||
* @memberof AddTranscript | ||
*/ | ||
results: Array<RecognitionResult>; | ||
} | ||
|
||
export const AddTranscriptMessageEnum = { | ||
AddTranscript: 'AddTranscript', | ||
} as const; | ||
|
||
export type AddTranscriptMessageEnum = | ||
(typeof AddTranscriptMessageEnum)[keyof typeof AddTranscriptMessageEnum]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './add-transcript'; | ||
export * from './recognition-alternative'; | ||
export * from './recognition-result'; | ||
export * from './recognition-metadata'; | ||
export * from './recognition-display'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// NOTE: This file is copied from realtime-client, not auto-generated | ||
|
||
import type { RecognitionDisplay } from '../models'; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface RecognitionAlternative | ||
*/ | ||
export interface RecognitionAlternative { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionAlternative | ||
*/ | ||
content: string; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionAlternative | ||
*/ | ||
confidence: number; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionAlternative | ||
*/ | ||
language?: string; | ||
/** | ||
* | ||
* @type {RecognitionDisplay} | ||
* @memberof RecognitionAlternative | ||
*/ | ||
display?: RecognitionDisplay; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionAlternative | ||
*/ | ||
speaker?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// NOTE: This file is copied from realtime-client, not auto-generated | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface RecognitionDisplay | ||
*/ | ||
export interface RecognitionDisplay { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionDisplay | ||
*/ | ||
direction: RecognitionDisplayDirectionEnum; | ||
} | ||
|
||
export const RecognitionDisplayDirectionEnum = { | ||
Ltr: 'ltr', | ||
Rtl: 'rtl', | ||
} as const; | ||
|
||
export type RecognitionDisplayDirectionEnum = | ||
(typeof RecognitionDisplayDirectionEnum)[keyof typeof RecognitionDisplayDirectionEnum]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// NOTE: This file is copied from realtime-client, not auto-generated | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface RecognitionMetadata | ||
*/ | ||
export interface RecognitionMetadata { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionMetadata | ||
*/ | ||
start_time: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionMetadata | ||
*/ | ||
end_time: number; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionMetadata | ||
*/ | ||
transcript: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// NOTE: This file is copied from realtime-client, not auto-generated | ||
|
||
import type { RecognitionAlternative } from './recognition-alternative'; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface RecognitionResult | ||
*/ | ||
export interface RecognitionResult { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionResult | ||
*/ | ||
type: RecognitionResultTypeEnum; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionResult | ||
*/ | ||
start_time: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionResult | ||
*/ | ||
end_time: number; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionResult | ||
*/ | ||
channel?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof RecognitionResult | ||
*/ | ||
attaches_to?: RecognitionResultAttachesToEnum; | ||
/** | ||
* | ||
* @type {boolean} | ||
* @memberof RecognitionResult | ||
*/ | ||
is_eos?: boolean; | ||
/** | ||
* | ||
* @type {Array<RecognitionAlternative>} | ||
* @memberof RecognitionResult | ||
*/ | ||
alternatives?: Array<RecognitionAlternative>; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionResult | ||
*/ | ||
score?: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof RecognitionResult | ||
*/ | ||
volume?: number; | ||
} | ||
|
||
export const RecognitionResultTypeEnum = { | ||
Word: 'word', | ||
Punctuation: 'punctuation', | ||
} as const; | ||
|
||
export type RecognitionResultTypeEnum = | ||
(typeof RecognitionResultTypeEnum)[keyof typeof RecognitionResultTypeEnum]; | ||
export const RecognitionResultAttachesToEnum = { | ||
Next: 'next', | ||
Previous: 'previous', | ||
None: 'none', | ||
Both: 'both', | ||
} as const; | ||
|
||
export type RecognitionResultAttachesToEnum = | ||
(typeof RecognitionResultAttachesToEnum)[keyof typeof RecognitionResultAttachesToEnum]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './client'; | ||
export * from './events'; | ||
export * from './personas'; | ||
export * from '../models'; |
Oops, something went wrong.