-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathFrameAudioQuery.ts
118 lines (108 loc) · 2.95 KB
/
FrameAudioQuery.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX Engine
* VOICEVOXの音声合成エンジンです。
*
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import type { FramePhoneme } from './FramePhoneme';
import {
FramePhonemeFromJSON,
FramePhonemeFromJSONTyped,
FramePhonemeToJSON,
} from './FramePhoneme';
/**
* フレームごとの音声合成用のクエリ
* @export
* @interface FrameAudioQuery
*/
export interface FrameAudioQuery {
/**
*
* @type {Array<number>}
* @memberof FrameAudioQuery
*/
f0: Array<number>;
/**
*
* @type {Array<number>}
* @memberof FrameAudioQuery
*/
volume: Array<number>;
/**
*
* @type {Array<FramePhoneme>}
* @memberof FrameAudioQuery
*/
phonemes: Array<FramePhoneme>;
/**
*
* @type {number}
* @memberof FrameAudioQuery
*/
volumeScale: number;
/**
*
* @type {number}
* @memberof FrameAudioQuery
*/
outputSamplingRate: number;
/**
*
* @type {boolean}
* @memberof FrameAudioQuery
*/
outputStereo: boolean;
}
/**
* Check if a given object implements the FrameAudioQuery interface.
*/
export function instanceOfFrameAudioQuery(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "f0" in value;
isInstance = isInstance && "volume" in value;
isInstance = isInstance && "phonemes" in value;
isInstance = isInstance && "volumeScale" in value;
isInstance = isInstance && "outputSamplingRate" in value;
isInstance = isInstance && "outputStereo" in value;
return isInstance;
}
export function FrameAudioQueryFromJSON(json: any): FrameAudioQuery {
return FrameAudioQueryFromJSONTyped(json, false);
}
export function FrameAudioQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrameAudioQuery {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'f0': json['f0'],
'volume': json['volume'],
'phonemes': ((json['phonemes'] as Array<any>).map(FramePhonemeFromJSON)),
'volumeScale': json['volumeScale'],
'outputSamplingRate': json['outputSamplingRate'],
'outputStereo': json['outputStereo'],
};
}
export function FrameAudioQueryToJSON(value?: FrameAudioQuery | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'f0': value.f0,
'volume': value.volume,
'phonemes': ((value.phonemes as Array<any>).map(FramePhonemeToJSON)),
'volumeScale': value.volumeScale,
'outputSamplingRate': value.outputSamplingRate,
'outputStereo': value.outputStereo,
};
}