feat(voice): enhance streaming engine and improve system reliability
Improve the PCM playback worklet with robust resampling and buffer management. Refactor the voice-stream service for better session teardown and error handling. Fix authentication issues by enabling credentials in HttpService and using relative URLs. Add Jalali date support and an AI model configuration tab in settings. Enhance diagnostics for voice transport and the audio engine.
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
AiModelConfig,
|
||||
AiTask,
|
||||
} from '../../shared/ui/ai-model-config-card/ai-model-config-card.component';
|
||||
import { toPersianDigits } from '../../shared/utils/format.util';
|
||||
import { formatJalaliDateTime, toPersianDigits } from '../../shared/utils/format.util';
|
||||
import {
|
||||
DocumentDetail,
|
||||
DocumentListItem,
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
DOCUMENT_STATUS_LABEL,
|
||||
} from '../../services/documents/documents.types';
|
||||
|
||||
type TabId = 'faq' | 'app';
|
||||
type TabId = 'faq' | 'app' | 'models';
|
||||
|
||||
type UploadStatus = 'uploading' | 'done' | 'error';
|
||||
interface UploadTask {
|
||||
@@ -151,6 +151,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
readonly tabs: { id: TabId; label: string }[] = [
|
||||
{ id: 'faq', label: 'آپلود FAQ' },
|
||||
{ id: 'app', label: 'تنظیمات برنامه' },
|
||||
{ id: 'models', label: 'تنظیمات مدلهای هوش مصنوعی' },
|
||||
];
|
||||
|
||||
readonly activeTab = signal<TabId>('faq');
|
||||
@@ -347,21 +348,9 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/** تاریخ آپلود به صورت تاریخ و ساعت جلالی */
|
||||
formatDateTime(iso: string): string {
|
||||
try {
|
||||
const d = new Date(iso);
|
||||
if (Number.isNaN(d.getTime())) {
|
||||
return '—';
|
||||
}
|
||||
const y = d.getFullYear();
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mm = String(d.getMinutes()).padStart(2, '0');
|
||||
return toPersianDigits(`${y}/${m}/${day} ${hh}:${mm}`);
|
||||
} catch {
|
||||
return '—';
|
||||
}
|
||||
return formatJalaliDateTime(iso);
|
||||
}
|
||||
|
||||
get fileCount(): number {
|
||||
|
||||
Reference in New Issue
Block a user