how to change the bot avatar ?
Closed this issue · 3 comments
valdesguefa commented
I set the botAvatar props to the name of the image in the same directory as my javascript file
bellow the bot avatar didn't show
headerTitle="Speech Synthesis"
speechSynthesis={{ enable: true, lang: 'en' }}
steps={steps}
botAvatar="robot_AI.png"
floating recognitionEnable
/>
</ThemeProvider>
</Wrapper>
</Layout>
valdesguefa commented
Here is the code
<Layout> <Wrapper> <ThemeProvider theme={theme}> <ChatBot headerTitle="Speech Synthesis" speechSynthesis={{ enable: true, lang: 'en' }} steps={steps} botAvatar="robot_AI.png" floating recognitionEnable /> </ThemeProvider> </Wrapper> </Layout>
pascalgagneur commented
I don't how your project is set up. But if it create react app or similar you could just import your image.
import botAvatarImg from '[path-to-asset]/robot_AI.png
...
<ChatBot headerTitle="Speech Synthesis" speechSynthesis={{ enable: true, lang: 'en' }} steps={steps} botAvatar={botAvatarImg} floating recognitionEnable />
valdesguefa commented
Thanks it work