Change rate to string type

This commit is contained in:
Hongbo Wu 2022-09-07 22:55:07 +08:00
parent 9a62a3c31e
commit 8e8a6dccd0
4 changed files with 6 additions and 6 deletions

View file

@ -7,7 +7,7 @@ declare module '@omnivore/text-to-speech-handler' {
export interface SSMLOptions {
primaryVoice?: string
secondaryVoice?: string
rate?: number
rate?: string
language?: string
}

View file

@ -32,13 +32,13 @@ export type SSMLItem = {
export type SSMLOptions = {
primaryVoice?: string
secondaryVoice?: string
rate?: number
rate?: string
language?: string
}
const DEFAULT_LANGUAGE = 'en-US'
const DEFAULT_VOICE = 'en-US-JennyNeural'
const DEFAULT_RATE = 1.25
const DEFAULT_RATE = '1.0'
const ANCHOR_ELEMENTS_BLOCKED_ATTRIBUTES = [
'omnivore-highlight-id',

View file

@ -13,7 +13,7 @@ import { htmlToSpeechFile } from './htmlToSsml'
interface UtteranceInput {
voice?: string
rate?: number
rate?: string
language?: string
text: string
idx: string
@ -24,7 +24,7 @@ interface HTMLInput {
text: string
voice?: string
language?: string
rate?: number
rate?: string
complimentaryVoice?: string
bucket: string
}

View file

@ -14,7 +14,7 @@ export interface TextToSpeechInput {
voice?: string
language?: string
textType?: 'html' | 'utterance'
rate?: number
rate?: string
secondaryVoice?: string
audioStream?: NodeJS.ReadWriteStream
}