{"ast":null,"code":"var _jsxFileName = \"D:\\\\Project\\\\UC_Trains_Voice\\\\react-demo\\\\src\\\\hooks\\\\useOptionsHooks.tsx\",\n  _s = $RefreshSig$();\nimport { useState, useRef } from 'react';\nimport { createFromIconfontCN } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport { jsxDEV as _jsxDEV, Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nconst PlayIcon = createFromIconfontCN({\n  scriptUrl: '//at.alicdn.com/t/c/font_4566050_zpduwnlv2t.js'\n});\n_c = PlayIcon;\nexport function useOptionsHooks() {\n  _s();\n  const [gender, setGender] = useState(\"Female\");\n  const [genderName, setGenderName] = useState(\"Fem01\");\n  const audioPlayerNew = useRef(null);\n  const [jsonFiles, setJsonFiles] = useState([]);\n  const [audioKey, setAudioKey] = useState(123);\n  const [audioSrc, setAudioSrc] = useState('');\n  const [jsonFileLength, setJsonFileLength] = useState(2);\n  const [playLyricCount, setPlayLyricCount] = useState(1);\n  const syllableCount = '5';\n  const saveGender = e => {\n    const [genderType, genderNameType] = e.key.split('-');\n    setGender(genderType);\n    setGenderName(genderNameType);\n    console.log(genderType);\n    console.log('genderName', genderName);\n  };\n\n  // audio\n  const playAudio = () => {\n    if (audioPlayerNew.current && audioPlayerNew.current.audio.current) {\n      audioPlayerNew.current.audio.current.play();\n      const audio = audioPlayerNew.current.audio.current;\n      if (audio.readyState === 4) {\n        audio.play().then(() => {\n          // setIsListen(isListen + 1);\n        }).catch(error => {\n          console.error('Fail play audios: ', error);\n        });\n      } else {\n        audio.addEventListener('canplay', () => {\n          audio.play().then(() => {\n            // setIsListen(isListen + 1);\n          }).catch(error => {\n            console.error('Fail play audios: ', error);\n          });\n        });\n      }\n    }\n  };\n  const fetchAudioData = () => {\n    let url = '';\n    if (gender === 'male') {\n      url = `https://ceas5.uc.edu/transvoice/jsondata/${syllableCount}/${gender}/list.json`;\n    } else {\n      url = `https://ceas5.uc.edu/transvoice/jsonDataOm/${gender}/${genderName}/${syllableCount}syllable/list.json`;\n    }\n    fetch(url).then(response => {\n      if (!response.ok) {\n        throw new Error('Network response was not ok');\n      }\n      return response.json();\n    }).then(data => {\n      setJsonFiles(data.json_files);\n      setJsonFileLength(data.json_files.length);\n      if (data.json_files.length > 0) {\n        let playLyricCountIn = Math.floor(Math.random() * data.json_files.length);\n        while (playLyricCountIn === playLyricCount) {\n          playLyricCountIn = Math.floor(Math.random() * data.json_files.length);\n        }\n        setPlayLyricCount(playLyricCountIn);\n        let audioFilename = '';\n        let audioUrl = '';\n        var timestamp = new Date().getTime();\n        if (gender === 'male') {\n          audioFilename = `${gender}-${data.json_files[playLyricCountIn].replace('.json', '')}.wav`;\n          audioUrl = `https://ceas5.uc.edu/transvoice/audio/${syllableCount}/${gender}/${audioFilename}?t=${timestamp}`;\n        } else {\n          audioFilename = `${genderName}-${gender}-${data.json_files[playLyricCountIn].replace('.json', '')}.wav`;\n          audioUrl = `https://ceas5.uc.edu/transvoice/audioOm/${gender}/${genderName}/${syllableCount}syllable/${audioFilename}?t=${timestamp}`;\n        }\n        console.log(audioUrl);\n        setAudioKey(Date.now());\n        setAudioSrc(audioUrl);\n        // if (audioPlayerNew.current && audioPlayerNew.current.audio.current) {\n        //   audioPlayerNew.current.audio.current.pause();\n        // }\n      }\n    }).catch(error => {\n      console.error('Error fetching JSON files:', error);\n    });\n  };\n  const handleIconClick = e => {\n    fetchAudioData();\n    setTimeout(() => {\n      playAudio();\n      console.log(\"play audio!\");\n    }, 50);\n  };\n  const handleIconClickDropdown = e => {\n    // setIsClickListen(isClickListen+1);\n    setTimeout(() => {\n      playAudio();\n      console.log(\"play audio!\");\n    }, 400);\n  };\n  const CustomButton = ({\n    label,\n    handleIconClick\n  }) => {\n    return /*#__PURE__*/_jsxDEV(Button, {\n      style: {\n        display: 'flex',\n        alignItems: 'center'\n      },\n      className: \"dropdownIcon\",\n      icon: /*#__PURE__*/_jsxDEV(PlayIcon, {\n        style: {\n          fontSize: '1.7em'\n        },\n        onClick: handleIconClick,\n        type: \"icon-audioPlay\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 142,\n        columnNumber: 9\n      }, this),\n      children: label\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 135,\n      columnNumber: 5\n    }, this);\n  };\n  const itemsAvatar = [{\n    key: 'Female-Fem01',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-01\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 160,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem02',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-02\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 170,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem03',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-03\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 180,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem04',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-04\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 190,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem05',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-05\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 200,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem06',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-06\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 210,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'Female-Fem07',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Female-07\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 220,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }, {\n    key: 'male',\n    label: /*#__PURE__*/_jsxDEV(CustomButton, {\n      label: \"Male-01\",\n      handleIconClick: handleIconClickDropdown\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 230,\n      columnNumber: 11\n    }, this),\n    onClick: saveGender\n  }];\n  const ModelSelections = () => {\n    /*#__PURE__*/_jsxDEV(_Fragment, {}, void 0, false);\n  };\n  return {\n    gender,\n    setGender,\n    genderName,\n    setGenderName,\n    audioPlayerNew,\n    jsonFiles,\n    setJsonFiles,\n    audioKey,\n    setAudioKey,\n    audioSrc,\n    setAudioSrc,\n    jsonFileLength,\n    setJsonFileLength,\n    playLyricCount,\n    setPlayLyricCount,\n    syllableCount,\n    playAudio,\n    fetchAudioData,\n    saveGender,\n    handleIconClick,\n    handleIconClickDropdown,\n    itemsAvatar\n  };\n}\n_s(useOptionsHooks, \"wmbIfWE0haJBC+vaZ/ZX9MUDD34=\");\nvar _c;\n$RefreshReg$(_c, \"PlayIcon\");","map":{"version":3,"names":["useState","useRef","createFromIconfontCN","Button","jsxDEV","_jsxDEV","Fragment","_Fragment","PlayIcon","scriptUrl","_c","useOptionsHooks","_s","gender","setGender","genderName","setGenderName","audioPlayerNew","jsonFiles","setJsonFiles","audioKey","setAudioKey","audioSrc","setAudioSrc","jsonFileLength","setJsonFileLength","playLyricCount","setPlayLyricCount","syllableCount","saveGender","e","genderType","genderNameType","key","split","console","log","playAudio","current","audio","play","readyState","then","catch","error","addEventListener","fetchAudioData","url","fetch","response","ok","Error","json","data","json_files","length","playLyricCountIn","Math","floor","random","audioFilename","audioUrl","timestamp","Date","getTime","replace","now","handleIconClick","setTimeout","handleIconClickDropdown","CustomButton","label","style","display","alignItems","className","icon","fontSize","onClick","type","fileName","_jsxFileName","lineNumber","columnNumber","children","itemsAvatar","ModelSelections","$RefreshReg$"],"sources":["D:/Project/UC_Trains_Voice/react-demo/src/hooks/useOptionsHooks.tsx"],"sourcesContent":["import { useState, useRef } from 'react';\r\nimport { COLORS } from '../types/configTypes';\r\nimport { adjustCanvasScale, map, drawBackground } from '../function/canvasDefault';\r\nimport {Dropdown} from 'antd'; \r\nimport AudioPlayer from 'react-h5-audio-player';\r\nimport { createFromIconfontCN } from '@ant-design/icons';\r\nimport { Button } from 'antd';\r\nimport type { MenuProps } from 'antd';\r\n\r\n\r\ninterface CustomButtonProps {\r\n  label: string;\r\n  handleIconClick?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void; \r\n}\r\n\r\nconst PlayIcon = createFromIconfontCN({\r\n  scriptUrl: '//at.alicdn.com/t/c/font_4566050_zpduwnlv2t.js',\r\n});\r\n\r\nexport function useOptionsHooks() {\r\n  const [gender, setGender] = useState<string>(\"Female\");\r\n  const [genderName, setGenderName] = useState<string>(\"Fem01\");\r\n  const audioPlayerNew = useRef<AudioPlayer>(null);\r\n  const [jsonFiles, setJsonFiles] = useState<string[]>([]);\r\n  const [audioKey, setAudioKey] = useState<number>(123);\r\n  const [audioSrc, setAudioSrc] = useState<string>('');\r\n  const [jsonFileLength,setJsonFileLength] = useState<number>(2);\r\n  const [playLyricCount,setPlayLyricCount] = useState<number>(1);\r\n\r\n  const syllableCount = '5';\r\n\r\n  const saveGender = (e: any) => {\r\n    const [genderType, genderNameType] = e.key.split('-');\r\n    setGender(genderType);\r\n    setGenderName(genderNameType);\r\n    console.log(genderType);\r\n    console.log('genderName', genderName)\r\n  }\r\n  \r\n    // audio\r\n    const playAudio = () => {\r\n      if (audioPlayerNew.current && audioPlayerNew.current.audio.current) {\r\n        audioPlayerNew.current.audio.current.play()\r\n        const audio = audioPlayerNew.current.audio.current;\r\n        if (audio.readyState === 4) {\r\n          audio.play()\r\n            .then(() => {\r\n              // setIsListen(isListen + 1);\r\n            })\r\n            .catch((error:Error) => {\r\n              console.error('Fail play audios: ', error);\r\n            });\r\n        } else {\r\n          audio.addEventListener('canplay', () => {\r\n            audio.play()\r\n              .then(() => {\r\n                // setIsListen(isListen + 1);\r\n              })\r\n              .catch((error:Error) => {\r\n                console.error('Fail play audios: ', error);\r\n              });\r\n          });\r\n        }\r\n      }\r\n    };\r\n\r\n    const fetchAudioData = () => {\r\n      let url = '';\r\n      if (gender === 'male') {\r\n        url = `https://ceas5.uc.edu/transvoice/jsondata/${syllableCount}/${gender}/list.json`;\r\n      } else {\r\n        url = `https://ceas5.uc.edu/transvoice/jsonDataOm/${gender}/${genderName}/${syllableCount}syllable/list.json`;\r\n      }\r\n  \r\n      fetch(url)\r\n        .then(response => {\r\n          if (!response.ok) {\r\n            throw new Error('Network response was not ok');\r\n          }\r\n          return response.json();\r\n        })\r\n        .then(data => {\r\n          setJsonFiles(data.json_files);\r\n          setJsonFileLength(data.json_files.length);\r\n          if (data.json_files.length > 0) {\r\n            let  playLyricCountIn = Math.floor(Math.random() * data.json_files.length);\r\n            while (playLyricCountIn === playLyricCount) {\r\n              playLyricCountIn = Math.floor(Math.random() * data.json_files.length);\r\n            }\r\n            setPlayLyricCount(playLyricCountIn);\r\n            let audioFilename = '';\r\n            let audioUrl = '';\r\n            var timestamp = new Date().getTime(); \r\n            if (gender === 'male') {\r\n              audioFilename = `${gender}-${data.json_files[playLyricCountIn].replace('.json', '')}.wav`;\r\n              audioUrl = `https://ceas5.uc.edu/transvoice/audio/${syllableCount}/${gender}/${audioFilename}?t=${timestamp}`;\r\n            } else {\r\n              audioFilename = `${genderName}-${gender}-${data.json_files[playLyricCountIn].replace('.json', '')}.wav`;\r\n              audioUrl = `https://ceas5.uc.edu/transvoice/audioOm/${gender}/${genderName}/${syllableCount}syllable/${audioFilename}?t=${timestamp}`;\r\n            }\r\n            console.log(audioUrl);\r\n  \r\n            setAudioKey(Date.now());\r\n            setAudioSrc(audioUrl);\r\n            // if (audioPlayerNew.current && audioPlayerNew.current.audio.current) {\r\n            //   audioPlayerNew.current.audio.current.pause();\r\n            // }\r\n          }\r\n        })\r\n        .catch(error => {\r\n          console.error('Error fetching JSON files:', error);\r\n        });\r\n    };\r\n\r\n\r\n    const handleIconClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\r\n      fetchAudioData();\r\n      setTimeout(() => {\r\n        playAudio();\r\n        console.log(\"play audio!\");\r\n      }, 50); \r\n    };\r\n  \r\n    const handleIconClickDropdown = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\r\n      // setIsClickListen(isClickListen+1);\r\n      setTimeout(() => {\r\n        playAudio();\r\n        console.log(\"play audio!\");\r\n      }, 400); \r\n    };\r\n\r\n    \r\nconst CustomButton: React.FC<CustomButtonProps> = ({ label, handleIconClick }) => {\r\n  return (\r\n    <Button\r\n      style={{\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n      }}\r\n      className='dropdownIcon'\r\n      icon={\r\n        <PlayIcon\r\n          style={{\r\n            fontSize: '1.7em',\r\n          }}\r\n          onClick={handleIconClick}\r\n          type=\"icon-audioPlay\"\r\n           />\r\n      }\r\n    >\r\n      {label}\r\n    </Button>\r\n  );\r\n};\r\n\r\n    const itemsAvatar: MenuProps['items'] = [\r\n      {\r\n        key: 'Female-Fem01',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-01\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem02',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-02\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem03',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-03\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem04',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-04\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem05',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-05\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem06',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-06\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'Female-Fem07',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Female-07\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n      {\r\n        key: 'male',\r\n        label: (\r\n          <CustomButton\r\n          label=\"Male-01\"\r\n          handleIconClick={handleIconClickDropdown}\r\n          />\r\n        ),\r\n        onClick: saveGender,\r\n      },\r\n    ];\r\n\r\n    const ModelSelections = () => {\r\n        <>\r\n        {/* <p># Model Selection: </p>\r\n              <Dropdown.Button\r\n                menu={{ items: itemsAvatar }}\r\n                placement=\"bottom\"\r\n                trigger={[\"click\"]}\r\n                overlayClassName='custom-dropdown'\r\n                buttonsRender={([leftButton, rightButton]) => [\r\n                  <Tooltip>\r\n                    <Button\r\n                      style={{\r\n                        display: 'flex',\r\n                        alignItems: 'center',\r\n                      }}\r\n                      onClick={handleIconClick}\r\n                      icon={\r\n                        <PlayIcon\r\n                          style={{\r\n                            fontSize: '1.7em',\r\n                          }}\r\n                          type=\"icon-audioPlay\"\r\n                           />\r\n                      }\r\n                    >\r\n                      {genderName === \"none\" ? \"Model Voice\" : gender === \"Female\" ? genderName : 'Male01'}\r\n                    </Button>\r\n                  </Tooltip>\r\n                  ,\r\n                  React.cloneElement(rightButton as React.ReactElement<any, string>, { loading: false }),\r\n                ]}\r\n              >\r\n              </Dropdown.Button> */}\r\n        </>\r\n    }\r\n    return {\r\n      gender,\r\n      setGender,\r\n      genderName,\r\n      setGenderName,\r\n      audioPlayerNew,\r\n      jsonFiles,\r\n      setJsonFiles,\r\n      audioKey,\r\n      setAudioKey,\r\n      audioSrc,\r\n      setAudioSrc,\r\n      jsonFileLength,\r\n      setJsonFileLength,\r\n      playLyricCount,\r\n      setPlayLyricCount,\r\n\r\n      syllableCount,\r\n\r\nplayAudio,\r\nfetchAudioData,\r\n\r\n\r\n      saveGender,\r\n\r\n\r\n      handleIconClick,\r\n      handleIconClickDropdown,\r\n\r\n      itemsAvatar,\r\n\r\n    }\r\n}"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AAKxC,SAASC,oBAAoB,QAAQ,mBAAmB;AACxD,SAASC,MAAM,QAAQ,MAAM;AAAC,SAAAC,MAAA,IAAAC,OAAA,EAAAC,QAAA,IAAAC,SAAA;AAS9B,MAAMC,QAAQ,GAAGN,oBAAoB,CAAC;EACpCO,SAAS,EAAE;AACb,CAAC,CAAC;AAACC,EAAA,GAFGF,QAAQ;AAId,OAAO,SAASG,eAAeA,CAAA,EAAG;EAAAC,EAAA;EAChC,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGd,QAAQ,CAAS,QAAQ,CAAC;EACtD,MAAM,CAACe,UAAU,EAAEC,aAAa,CAAC,GAAGhB,QAAQ,CAAS,OAAO,CAAC;EAC7D,MAAMiB,cAAc,GAAGhB,MAAM,CAAc,IAAI,CAAC;EAChD,MAAM,CAACiB,SAAS,EAAEC,YAAY,CAAC,GAAGnB,QAAQ,CAAW,EAAE,CAAC;EACxD,MAAM,CAACoB,QAAQ,EAAEC,WAAW,CAAC,GAAGrB,QAAQ,CAAS,GAAG,CAAC;EACrD,MAAM,CAACsB,QAAQ,EAAEC,WAAW,CAAC,GAAGvB,QAAQ,CAAS,EAAE,CA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