Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions localization/TranscriberAdmin-en-1.2.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -9386,6 +9386,13 @@
<context context-type="sourcefile">Access.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="shared.ok">
<source>OK</source>
<target/>
<context-group context-type="sourcefile">
<context context-type="sourcefile">MicrophoneDialog.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="shared.paratextchapterSpan">
<source>Passage {0}.{1} {2}: Passage must not span chapters.</source>
<target/>
Expand Down Expand Up @@ -12778,7 +12785,7 @@
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.convertVoiceAi">
<source>Convert Voice (AI)</source>
<source>Convert Voice (AI)...</source>
<target/>
<context-group>
<context context-type="sourcefile">wsAudioPlayer.tsx</context>
Expand Down Expand Up @@ -12847,6 +12854,13 @@
<context context-type="sourcefile">wsAudioPlayer.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.microphoneListFailed">
<source>Could not get the list of microphones.</source>
<target/>
<context-group context-type="sourcefile">
<context context-type="sourcefile">MicrophoneDialog.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.moreOptions">
<source>More Options</source>
<target/>
Expand Down Expand Up @@ -12980,6 +12994,13 @@
<context context-type="sourcefile">wsAudioPlayer.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.resetAudio">
<source>Reset Audio</source>
<target/>
<context-group context-type="sourcefile">
<context context-type="sourcefile">AudioPlayer.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.resetSegments">
<source>Reset</source>
<target/>
Expand Down Expand Up @@ -13009,7 +13030,7 @@
</context-group>
</trans-unit>
<trans-unit id="wsAudioPlayer.selectMicrophoneMenu">
<source>Select Microphone</source>
<source>Select Microphone...</source>
<target/>
<context-group>
<context context-type="sourcefile">wsAudioPlayer.tsx</context>
Expand Down
22 changes: 20 additions & 2 deletions localization/TranscriberAdmin-en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -8044,6 +8044,12 @@
<target/>
</segment>
</unit>
<unit id="shared.ok">
<segment>
<source>OK</source>
<target/>
</segment>
</unit>
<unit id="shared.paratextchapterSpan">
<segment>
<source>Passage {0}.{1} {2}: Passage must not span chapters.</source>
Expand Down Expand Up @@ -10950,7 +10956,7 @@
</unit>
<unit id="wsAudioPlayer.convertVoiceAi">
<segment>
<source>Convert Voice (AI)</source>
<source>Convert Voice (AI)...</source>
<target/>
</segment>
</unit>
Expand Down Expand Up @@ -11008,6 +11014,12 @@
<target/>
</segment>
</unit>
<unit id="wsAudioPlayer.microphoneListFailed">
<segment>
<source>Could not get the list of microphones.</source>
<target/>
</segment>
</unit>
<unit id="wsAudioPlayer.moreOptions">
<segment>
<source>More Options</source>
Expand Down Expand Up @@ -11122,6 +11134,12 @@
<target/>
</segment>
</unit>
<unit id="wsAudioPlayer.resetAudio">
<segment>
<source>Reset Audio</source>
<target/>
</segment>
</unit>
<unit id="wsAudioPlayer.resetSegments">
<segment>
<source>Reset</source>
Expand All @@ -11148,7 +11166,7 @@
</unit>
<unit id="wsAudioPlayer.selectMicrophoneMenu">
<segment>
<source>Select Microphone</source>
<source>Select Microphone...</source>
<target/>
</segment>
</unit>
Expand Down
1 change: 1 addition & 0 deletions web/public/localization/strings4b921a07.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion web/public/localization/stringscc119adc.json

This file was deleted.

4 changes: 2 additions & 2 deletions web/src/business/voice/SelectVoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface ISelectVoice {
noNewVoice?: boolean;
onlySettings?: boolean;
onOpen: () => void;
begin?: () => void;
begin?: (voice: string) => void;
refresh?: () => void;
}

Expand Down Expand Up @@ -104,7 +104,7 @@ export default function SelectVoice({
<Button
color="primary"
disabled={!voice?.trim() || !rights}
onClick={begin}
onClick={() => begin?.(voice!)}
>
{t.convert}
</Button>
Expand Down
51 changes: 51 additions & 0 deletions web/src/components/AiProcessing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { Box, Typography } from '@mui/material';
import { shallowEqual, useSelector } from 'react-redux';
import { Button } from '../control';
import { ISharedStrings, IWsAudioPlayerStrings } from '../model';
import { sharedSelector, wsAudioPlayerSelector } from '../selector';
import AiTimeProgress from './AiTimeProgress';

interface AiProcessingProps {
startedAt: number;
estimateSec: number;
onCancel: () => void;
}

/** Shown in place of a player while an AI request runs. */
export function AiProcessing({
startedAt,
estimateSec,
onCancel,
}: AiProcessingProps) {
const t: IWsAudioPlayerStrings = useSelector(
wsAudioPlayerSelector,
shallowEqual
);
const ts: ISharedStrings = useSelector(sharedSelector, shallowEqual);

return (
<Box
sx={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 1,
px: 2,
py: 1,
}}
>
<Typography sx={{ textAlign: 'center', overflowWrap: 'break-word' }}>
{t.aiInProgress}
</Typography>
<AiTimeProgress
estimateSec={estimateSec}
startedAt={startedAt}
textId="ai-time-estimate"
/>
<Button id="ai-cancel" onClick={onCancel}>
{ts.cancel}
</Button>
</Box>
);
}
Loading
Loading