Skip to content

Commit 16c03ce

Browse files
committed
fix: the optional input language on the getAvailableVoices method
1 parent ad743f4 commit 16c03ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/NativeSpeech.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export interface Spec extends TurboModule {
102102
initialize: (options: VoiceOptions) => void;
103103
openVoiceDataInstaller: () => Promise<void>;
104104
setEngine: (engineName: string) => Promise<void>;
105-
getAvailableVoices: (language: string) => Promise<VoiceProps[]>;
105+
getAvailableVoices: (language?: string) => Promise<VoiceProps[]>;
106106
speakWithOptions: (text: string, options: VoiceOptions) => Promise<void>;
107107
//Listeners
108108
readonly onError: EventEmitter<EventProps>;

src/Speech.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class Speech {
2626
* const englishVoices = await Speech.getAvailableVoices('en');
2727
*/
2828
public static getAvailableVoices(language?: string): Promise<VoiceProps[]> {
29-
return TurboSpeech.getAvailableVoices(language ?? '');
29+
return TurboSpeech.getAvailableVoices(language);
3030
}
3131
/**
3232
* Gets a list of all available text-to-speech engines on the device

0 commit comments

Comments
 (0)