Skip to content

Commit

Permalink
Merge pull request #45 from ryunix/allow-editing-of-audio-query
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna2134 authored Sep 17, 2023
2 parents 5579327 + e26c7dd commit 5dbf773
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/audio_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand All @@ -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;
Expand Down Expand Up @@ -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
);
}
}

0 comments on commit 5dbf773

Please sign in to comment.