fix: dont use any

This commit is contained in:
2026-02-11 02:36:33 -03:00
parent 1927728b60
commit c44f92f777
+8 -1
View File
@@ -28,6 +28,13 @@ interface PendingRequest {
audioBuff: Buffer[];
}
interface VoiceInfo {
Name: string;
// ShortName: string,
// Gender: string,
// Locale: string,
}
class AzureTTS implements TTSModule {
private voices: Array<string> | undefined = undefined;
@@ -81,7 +88,7 @@ class AzureTTS implements TTSModule {
res.on('data', (chunk) => chunks.push(chunk));
res.on('end', () => {
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);
});
req.on('error', (err) => {