From e26c7dd4ad477fe9780014e619a516d4c005fce6 Mon Sep 17 00:00:00 2001 From: ryunix Date: Mon, 18 Sep 2023 00:18:56 +0900 Subject: [PATCH] Allow editing of audioQuery --- src/audio_query.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/audio_query.ts b/src/audio_query.ts index b29b4d6..590a362 100644 --- a/src/audio_query.ts +++ b/src/audio_query.ts @@ -5,7 +5,6 @@ import { synthesisParams } from "./types/synthesis"; // audio query export class audioQuery { private rest: RestAPI; - private audioQuery: audioQueryT; public speedScale: number; public pitchScale: number; public accentPhrases: accentPhrase[]; @@ -19,7 +18,6 @@ export class audioQuery { constructor(rest: RestAPI, audioQuery: audioQueryT) { this.rest = rest; - this.audioQuery = audioQuery; this.accentPhrases = audioQuery.accent_phrases; this.speedScale = audioQuery.speedScale; this.pitchScale = audioQuery.pitchScale; @@ -58,6 +56,9 @@ export class audioQuery { if (options.core_version) { params["core_version"] = options.core_version; } - return await this.rest.synthesis(this.audioQuery, params); + return await this.rest.synthesis( + { ...this, accent_phrases: this.accentPhrases }, + params + ); } }