Klleon Chat SDK
English
English
  • ✨New Javascript SDK [1.2.0]
    • Getting Started
    • Events
    • UI
    • Methods
      • Life Cycle
      • Text Chat
      • Voice Chat
      • Echo Chat
      • Audio Echo Chat
      • Other
    • TypeScript Support
    • Examples
      • VanillaJS
      • React
      • Nextjs
    • Log System
    • Updates
  • JavaScript SDK [v0.x.x] (Planned for Deprecation)
    • Quick Start
    • Initialize
    • Avatar Streaming
      • Start Streaming
      • Stop Streaming
      • Control Streaming Screen
    • Set Chat Screen
    • Text Message
    • Voice Message
    • Echo - Repeat My Message
    • Event Subscription
    • Updates
  • Service Architecture
Powered by GitBook
LogoLogo

Products

  • Pricing

Websites

  • Homepage
  • Youtube
  • Linkedin

Copyright © Klleon. All rights reserved

On this page
  • Parameters
  • Example
  1. JavaScript SDK [v0.x.x] (Planned for Deprecation)
  2. Avatar Streaming

Start Streaming

Call the Start Avatar Streaming function to start streaming. The initialization parameters can optionally set the avatar streaming language, whether to output UI, etc.

PreviousAvatar StreamingNextStop Streaming

Last updated 10 months ago

Parameters

Name
Type
Default
Description
Required

show

boolean

true

Whether to display the avatar streaming screen

X

show_dialog

boolean

true

Whether to output the JavaScript SDK's default Dialog

X

show_loading

boolean

true

Whether to output a streaming loading screen

X

enable_microphone

boolean

true

Whether to use the JavaScript SDK microphone

X

avatar_id

String

Avatar ID to stream

O

voice_code

String

ko_kr

Voice language code for the avatar ko_kr: Korean en_us: English

ja_jp: Japanese es_es: Spanish

id_id: Indonesian

X

subtitle_code

String

ko_kr

Subtitle language code for the avatar ko_kr: Korean en_us: English

ja_jp: Japanese es_es: Spanish

id_id: Indonesian

X

voice_tts_speech_speed

double

1.0

Adjusting avatar speaking speed

X

fit

String

cover

Options for resizing Avatar streaming screen

contain: full output while maintaining the streaming ratio

cover: output full screen while maintaining streaming ratio

fill: Disregard the streaming original proportions and fill the screen for output

none: Do not scale the stream

scale_down: output the smaller value of the alternative streaming between none and contain

X

width

double

Avatar streaming screen width px

X

height

double

Avatar streaming screen height px

X

radius

double

0

Roundness of corners for the avatar streaming screen border

X

primary_color

int

0xFF0C5EF0

Main color in the Javascript SDK UI

X

background_color

int

0xFFFFFFFF

Background color of the streaming screen

X


Example

<script>
    KlleonChat.showStreaming({
        show_dialog: false,
        show_loading: false,
        avatar_id: 'a5fe629d-0090-11ef-8ee1-0abbf354c5cc',
        voice_code: 'en_us',
        subtitle_code: 'en_us',
        voice_tts_speech_speed: 1.0,
        width: 300,
        height: 600,
        radius: 20,
        primary_color: 0xFF0C5EF0,
        background_color: 0xFFFFFFFF
    });
</script>