Skip to content

Commit

Permalink
Resolves some compiler errors and bumps to 0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseinBahmany committed Nov 28, 2023
1 parent edfac9b commit 02ddd46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatbot-panel",
"version": "0.0.6",
"version": "0.0.7",
"description": "Chatbot Panel",
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
Expand Down
4 changes: 2 additions & 2 deletions src/api/chatbot-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BotGenerateRequest } from '../agents/bot-types'

// const BASE_URL = `https://dso.dev.meeraspace.com/chatbot-api/v1`
const BASE_URL = 'http://localhost:8000/api/v1'
const BASE_URL = `https://dso.dev.meeraspace.com/chatbot-api/v1`
// const BASE_URL = 'http://localhost:8000/api/v1'

export async function transcribe(voice: Blob) {
const formData = new FormData()
Expand Down
7 changes: 4 additions & 3 deletions src/components/audio-player/StreamingAudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const StreamingAudioPlayer = ({ text, id }: Props) => {
})
}
}, [])
//

useEffect(() => {
StreamingAudioPlayerEvents.subscribe(STREAMING_AUDIO_PLAYER.PLAY, id, playEventListener)
StreamingAudioPlayerEvents.subscribe(STREAMING_AUDIO_PLAYER.RESUME, id, resumeEventListener)
Expand All @@ -198,6 +198,7 @@ export const StreamingAudioPlayer = ({ text, id }: Props) => {
StreamingAudioPlayerEvents.unsubscribe(STREAMING_AUDIO_PLAYER.RESUME, id, () => {})
StreamingAudioPlayerEvents.unsubscribe(STREAMING_AUDIO_PLAYER.PAUSE, id, () => {})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

/** Renderer */
Expand All @@ -210,7 +211,7 @@ export const StreamingAudioPlayer = ({ text, id }: Props) => {
<Button title={'Resume'} onClick={onResumeClick} displayTitle={false} frame={false} imageSource={PlayIcon} />
)}

{!isPlaying && queuedAudioBuffers.current.length == 0 && !isConvertingTextToSpeech && (
{!isPlaying && queuedAudioBuffers.current.length === 0 && !isConvertingTextToSpeech && (
<Button
title={'Text to Speech'}
onClick={onConvertTextToAudioClick}
Expand All @@ -219,7 +220,7 @@ export const StreamingAudioPlayer = ({ text, id }: Props) => {
imageSource={TextTpSpeechIcon}
/>
)}
{!isPlaying && queuedAudioBuffers.current.length == 0 && isConvertingTextToSpeech && (
{!isPlaying && queuedAudioBuffers.current.length === 0 && isConvertingTextToSpeech && (
<Button
title={'Converting Text to Speech'}
onClick={() => {}}
Expand Down

0 comments on commit 02ddd46

Please sign in to comment.