File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,11 @@ export const ttsLanguage = async (): Promise<Language[]> => {
3131 }
3232} ;
3333
34- export const ttsStyle = async ( ) : Promise < Style [ ] > => {
34+ export const ttsStyle = async ( selectedLanguage : string ) : Promise < Style [ ] > => {
3535 try {
36- const response = await apiClient . get ( '/style' ) ;
36+ const response = await apiClient . get (
37+ `/style/search?languagecode=${ selectedLanguage } `
38+ ) ;
3739 return response . data . response . styleList ;
3840 } catch ( error ) {
3941 console . error ( error ) ;
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const VoiceSelectionPopover: React.FC<VoiceSelectionPopoverProps> = ({
9494 if ( selectedLanguage ) {
9595 const fetchStyles = async ( ) => {
9696 try {
97- const styleData = await ttsStyle ( ) ;
97+ const styleData = await ttsStyle ( selectedLanguage ) ;
9898 const updatedStyles = styleData . map ( ( style : Style ) => ( {
9999 ...style ,
100100 mood :
You can’t perform that action at this time.
0 commit comments