fix: dont use any
This commit is contained in:
@@ -28,6 +28,13 @@ interface PendingRequest {
|
|||||||
audioBuff: Buffer[];
|
audioBuff: Buffer[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface VoiceInfo {
|
||||||
|
Name: string;
|
||||||
|
// ShortName: string,
|
||||||
|
// Gender: string,
|
||||||
|
// Locale: string,
|
||||||
|
}
|
||||||
|
|
||||||
class AzureTTS implements TTSModule {
|
class AzureTTS implements TTSModule {
|
||||||
private voices: Array<string> | undefined = undefined;
|
private voices: Array<string> | undefined = undefined;
|
||||||
|
|
||||||
@@ -81,7 +88,7 @@ class AzureTTS implements TTSModule {
|
|||||||
res.on('data', (chunk) => chunks.push(chunk));
|
res.on('data', (chunk) => chunks.push(chunk));
|
||||||
res.on('end', () => {
|
res.on('end', () => {
|
||||||
const body = Buffer.concat(chunks).toString();
|
const body = Buffer.concat(chunks).toString();
|
||||||
this.voices = JSON.parse(body).map((v: any) => v.ShortName)
|
this.voices = JSON.parse(body).map((v: VoiceInfo) => v.ShortName);
|
||||||
resolve(this.voices);
|
resolve(this.voices);
|
||||||
});
|
});
|
||||||
req.on('error', (err) => {
|
req.on('error', (err) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user