|
388 | 388 | {{ t('integration_openai', 'No models to list') }}
|
389 | 389 | </NcNoteCard>
|
390 | 390 | </div>
|
391 |
| - <div v-if="state.tts_provider_exists"> |
392 |
| - <h2> |
393 |
| - {{ t('integration_openai', 'Text to speech') }} |
394 |
| - </h2> |
395 |
| - <div v-if="models" |
396 |
| - class="line line-select"> |
397 |
| - <NcSelect |
398 |
| - v-model="selectedModel.tts" |
399 |
| - class="model-select" |
400 |
| - :clearable="state.default_tts_model_id !== DEFAULT_MODEL_ITEM.id" |
401 |
| - :options="formattedModels" |
402 |
| - :input-label="t('integration_openai', 'Default speech generation model to use')" |
403 |
| - :no-wrap="true" |
404 |
| - input-id="openai-tts-model-select" |
405 |
| - @input="onModelSelected('tts', $event)" /> |
406 |
| - <a v-if="state.url === ''" |
407 |
| - :title="t('integration_openai', 'More information about OpenAI models')" |
408 |
| - href="https://beta.openai.com/docs/models" |
409 |
| - target="_blank"> |
410 |
| - <NcButton type="tertiary" aria-label="openai-info"> |
411 |
| - <template #icon> |
412 |
| - <HelpCircleIcon /> |
413 |
| - </template> |
414 |
| - </NcButton> |
415 |
| - </a> |
416 |
| - <a v-else |
417 |
| - :title="t('integration_openai', 'More information about LocalAI models')" |
418 |
| - href="https://localai.io/model-compatibility/index.html" |
419 |
| - target="_blank"> |
420 |
| - <NcButton type="tertiary" aria-label="localai-info"> |
421 |
| - <template #icon> |
422 |
| - <HelpCircleIcon /> |
423 |
| - </template> |
424 |
| - </NcButton> |
425 |
| - </a> |
426 |
| - </div> |
427 |
| - <NcNoteCard v-else type="info"> |
428 |
| - {{ t('integration_openai', 'No models to list') }} |
429 |
| - </NcNoteCard> |
430 |
| - <div class="line column"> |
431 |
| - <label>{{ t('integration_openai', 'TTS Voices') }} |
432 |
| - <NcButton |
433 |
| - :title="t('integration_openai', 'A list of voices supported by the endpoint you are using. Defaults to openai\'s list.')" |
434 |
| - type="tertiary" |
435 |
| - aria-label="voices-info"> |
436 |
| - <template #icon> |
437 |
| - <HelpCircleIcon /> |
438 |
| - </template> |
439 |
| - </NcButton> |
440 |
| - </label> |
441 |
| - <NcSelect v-model="state.tts_voices" |
442 |
| - :label-outside="true" |
443 |
| - multiple |
444 |
| - taggable |
445 |
| - style="width: 350px;" |
446 |
| - @input="onInput()" /> |
447 |
| - </div> |
| 391 | + <h2> |
| 392 | + {{ t('integration_openai', 'Text to speech') }} |
| 393 | + </h2> |
| 394 | + <div v-if="models" |
| 395 | + class="line line-select"> |
448 | 396 | <NcSelect
|
449 |
| - v-model="state.default_tts_voice" |
| 397 | + v-model="selectedModel.tts" |
450 | 398 | class="model-select"
|
451 |
| - :options="state.tts_voices" |
452 |
| - :input-label="t('integration_openai', 'Default voice to use')" |
| 399 | + :clearable="state.default_tts_model_id !== DEFAULT_MODEL_ITEM.id" |
| 400 | + :options="formattedModels" |
| 401 | + :input-label="t('integration_openai', 'Default speech generation model to use')" |
453 | 402 | :no-wrap="true"
|
454 |
| - input-id="openai-tts-voices-select" |
| 403 | + input-id="openai-tts-model-select" |
| 404 | + @input="onModelSelected('tts', $event)" /> |
| 405 | + <a v-if="state.url === ''" |
| 406 | + :title="t('integration_openai', 'More information about OpenAI models')" |
| 407 | + href="https://beta.openai.com/docs/models" |
| 408 | + target="_blank"> |
| 409 | + <NcButton type="tertiary" aria-label="openai-info"> |
| 410 | + <template #icon> |
| 411 | + <HelpCircleIcon /> |
| 412 | + </template> |
| 413 | + </NcButton> |
| 414 | + </a> |
| 415 | + <a v-else |
| 416 | + :title="t('integration_openai', 'More information about LocalAI models')" |
| 417 | + href="https://localai.io/model-compatibility/index.html" |
| 418 | + target="_blank"> |
| 419 | + <NcButton type="tertiary" aria-label="localai-info"> |
| 420 | + <template #icon> |
| 421 | + <HelpCircleIcon /> |
| 422 | + </template> |
| 423 | + </NcButton> |
| 424 | + </a> |
| 425 | + </div> |
| 426 | + <NcNoteCard v-else type="info"> |
| 427 | + {{ t('integration_openai', 'No models to list') }} |
| 428 | + </NcNoteCard> |
| 429 | + <div class="line column"> |
| 430 | + <label>{{ t('integration_openai', 'TTS Voices') }} |
| 431 | + <NcButton |
| 432 | + :title="t('integration_openai', 'A list of voices supported by the endpoint you are using. Defaults to openai\'s list.')" |
| 433 | + type="tertiary" |
| 434 | + aria-label="voices-info"> |
| 435 | + <template #icon> |
| 436 | + <HelpCircleIcon /> |
| 437 | + </template> |
| 438 | + </NcButton> |
| 439 | + </label> |
| 440 | + <NcSelect v-model="state.tts_voices" |
| 441 | + :label-outside="true" |
| 442 | + multiple |
| 443 | + taggable |
| 444 | + style="width: 350px;" |
455 | 445 | @input="onInput()" />
|
456 | 446 | </div>
|
| 447 | + <NcSelect |
| 448 | + v-model="state.default_tts_voice" |
| 449 | + class="model-select" |
| 450 | + :options="state.tts_voices" |
| 451 | + :input-label="t('integration_openai', 'Default voice to use')" |
| 452 | + :no-wrap="true" |
| 453 | + input-id="openai-tts-voices-select" |
| 454 | + @input="onInput()" /> |
457 | 455 | <div>
|
458 | 456 | <h2>
|
459 | 457 | {{ t('integration_openai', 'Usage limits') }}
|
|
565 | 563 | @update:checked="onCheckboxChanged($event, 'stt_provider_enabled', false)">
|
566 | 564 | {{ t('integration_openai', 'Speech-to-text provider (to transcribe Talk recordings for example)') }}
|
567 | 565 | </NcCheckboxRadioSwitch>
|
568 |
| - <div v-if="state.tts_provider_exists"> |
569 |
| - <NcCheckboxRadioSwitch |
570 |
| - :checked="state.tts_provider_enabled" |
571 |
| - @update:checked="onCheckboxChanged($event, 'tts_provider_enabled', false)"> |
572 |
| - {{ t('integration_openai', 'Text-to-speech provider') }} |
573 |
| - </NcCheckboxRadioSwitch> |
574 |
| - </div> |
| 566 | + <NcCheckboxRadioSwitch |
| 567 | + :checked="state.tts_provider_enabled" |
| 568 | + @update:checked="onCheckboxChanged($event, 'tts_provider_enabled', false)"> |
| 569 | + {{ t('integration_openai', 'Text-to-speech provider') }} |
| 570 | + </NcCheckboxRadioSwitch> |
575 | 571 | </div>
|
576 | 572 | </div>
|
577 | 573 | </div>
|
|
0 commit comments