voice.setStreamingRecognize - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

์ŠคํŠธ๋ฆฌ๋ฐ์Œ์„ฑ์ธ์‹ ์„ค์ •

gigagenie.voice.setStreamingRecognize

์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹๋ชจ๋“œ๋ฅผ ์„ค์ •ํ•œ๋‹ค. ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹๋ชจ๋“œ๋ฅผ ์„ค์ •ํ•˜๋ฉด ํŠน์ • ์ข…๋ฃŒ ์กฐ๊ฑด ๋ฐœ์ƒ ์ „๊นŒ์ง€ mode์— ๋”ฐ๋ฅธ ์Œ์„ฑ ์ŠคํŠธ๋ฆผ ์†Œ์Šค์— ๋Œ€ํ•˜์—ฌ ์Œ์„ฑ์ธ์‹์„ ์‹คํ–‰ํ•œ๋‹ค.

  • function setStreamingRecognize(options,callback)

  • options ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ค์ •ํ•œ๋‹ค.

    • options.mode : Int, Mandatory๋กœ ๋‹ค์Œ์˜ ๊ฐ’์„ ๊ฐ€์ง„๋‹ค.
    • options.mode=0: ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹ ๋ชจ๋“œ ํ•ด์ œ
    • options.mode=1 : ๋งˆ์ดํฌ์—์„œ ์บก์ณ๋˜๋Š” ์Œ์„ฑ ๋ฐ์ดํ„ฐ๋กœ ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹ ์‹คํ–‰๋˜๋ฉฐ ๋งˆ์ดํฌ ์ž…๋ ฅ์ด waitthreshold ์ดํ•˜๋กœ waittime ๋งŒํผ ๋ฐœ์ƒํ•˜๋ฉด onStreamingRecogResult ์— mute ์ด๋ฒคํŠธ๋ฅผ ์ „์†กํ•œ๋‹ค. ์ด ๋ชจ๋“œ๋Š” ๋ช…์‹œ์ ์œผ๋กœ ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹๋ชจ๋“œ๋ฅผ ํ•ด์ œ ํ•˜์ง€ ์•Š์œผ๋ฉด ์Œ์„ฑ์ธ์‹์ด ์ข…๋ฃŒ๋˜์ง€ ์•Š๋Š”๋‹ค.
    • options.mode=2 : ๋งˆ์ดํฌ์—์„œ waitthreshold ์ด์ƒ์˜ ์ž…๋ ฅ์ด ๋ฐœ์ƒํ•˜๋ฉด ์Œ์„ฑ์ธ์‹์„ ์‹œ์ž‘ํ•˜๋ฉฐ, ๋งˆ์ดํฌ ์ž…๋ ฅ์ด waitthreshold ์ดํ•˜๋กœ waittime๋งŒํผ ๋ฐœ์ƒํ•˜๋ฉด onStreamingRecogResult์— waitTimeout ์ด๋ฒคํŠธ๋ฅผ ์ „์†กํ•œ๋‹ค. ์ด ๋ชจ๋“œ๋Š” ๋ช…์‹œ์ ์œผ๋กœ ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹๋ชจ๋“œ๋ฅผ ํ•ด์ œํ•˜์ง€ ์•Š์œผ๋ฉด ์Œ์„ฑ์ธ์‹์ด ์ข…๋ฃŒ๋˜์ง€ ์•Š๋Š”๋‹ค.
    • options.mode=3 : ๋งˆ์ดํฌ์—์„œ waitthreshold ์ด์ƒ์˜ ์ž…๋ ฅ์ด ๋ฐœ์ƒํ•˜๋ฉด ์Œ์„ฑ์ธ์‹์„ ์‹œ์ž‘ํ•˜๋ฉฐ, ๋งˆ์ดํฌ ์ž…๋ ฅ์ด waitthreshold ์ดํ•˜๋กœ waittime๋งŒํผ ๋ฐœ์ƒํ•˜๋ฉด onStreamingRecogResult์— waitTimeout ์ด๋ฒคํŠธ๋ฅผ ์ „์†กํ•œ๋‹ค. ์ด ๊ฒฝ์šฐ ์ŠคํŠธ๋ฆฌ๋ฐ ์Œ์„ฑ์ธ์‹๋ชจ๋“œ๋ฅผ ํ•ด์ œํ•œ๋‹ค.
    • options.waittimeout : Int, Optional๋กœ ๋งˆ์ดํฌ ์ž…๋ ฅ ๋Œ€๊ธฐ ์‹œ๊ฐ„(๋ฐ€๋ฆฌ์ดˆ) ์ด๋‹ค. Waittimeout์€ ๋งˆ์ดํฌ ์ž…๋ ฅ ๋Œ€๊ธฐ ์‹œ๊ฐ„์œผ๋กœ waitthreshold์ดํ•˜๋กœ ๋งˆ์ดํฌ ์ž…๋ ฅ์ด waittimeout๋งŒํผ ์ง€์†๋˜๋Š” ๊ฒฝ์šฐgigagenie.voice.onStreammingRecogResult ์— waittimeout event๊ฐ€ ๋ฐœ์ƒ๋œ๋‹ค.
    • options.waitthreshold : Int, Optionl๋กœ ๋งˆ์ดํฌ ์ž…๋ ฅ ๋Œ€๊ธฐ threashold ์ด๋‹ค. ํ•ด๋‹น ๊ฐ’ ์ดํ•˜๋กœ ๋งˆ์ดํฌ ์ž…๋ ฅ์ด waittimeout ๋งŒํผ ์ง€์†๋˜๋Š” ๊ฒฝ์šฐ gigagenie.voice.onStreammingRecognize ์— waittimeout event๊ฐ€ ๋ฐœ์ƒ๋œ๋‹ค. Default๋Š” 0์ด๋‹ค.
  • result_cd์— ๋‹ค์Œ์˜ ๊ฐ’์ด ์ „๋‹ฌ๋œ๋‹ค.

    • 200 : ๋ชจ๋“œ ์„ค์ • ์„ฑ๊ณต
    • 500 : ์‹œ์Šคํ…œ ์˜ค๋ฅ˜
    • 503 : ํ˜„์žฌ Pause ์ƒํƒœ๋กœ ๋ช…๋ น ์ˆ˜์‹  ๋ถˆ๊ฐ€
    • extra ๊ฐ’์€ null ์ด๋‹ค.
  • ์‚ฌ์šฉ ์˜ˆ : gigagenie.voice.onStreamingRecognize ์—์„œ ๊ฐ™์ด ์„ค๋ช…

ํ™œ์šฉ ์˜ˆ์ œ๋Š” (GiGA Genie 2048)์—์„œ ํ™•์ธ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค

โš ๏ธ **GitHub.com Fallback** โš ๏ธ