기존 에이전트로 작업하려는 경우도 가능합니다. 에이전트 설정에서 자동 음성 적응만 사용 설정했는지 확인하면 됩니다. 새 에이전트의 경우에는 이 옵션이 자동으로 사용 설정됩니다.
시퀀스 인식기 항목 만들기
이 에이전트의 핵심 기능은 음성을 통해 영숫자 시퀀스를 이해하는 것입니다. 특히 한 번에 조금씩 문자를 리슨하고, 모든 부속 시퀀스를 하나로 묶어서, 데이터 저장소에서 최종 시퀀스를 검증하도록 에이전트를 설정합니다. 우선 부분 시퀀스를 인식하기 위한 항목 정의로 시작합니다.
정규 표현식 시퀀스 항목 만들기
자동 음성 적응이 'a bee sea' 대신 'ABC'로 리슨할 수 있도록 정규 표현식 항목을 사용하여 시퀀스를 캡처해야 합니다.
최소 3자 이상의 모든 영숫자 시퀀스를 수락하도록 항목을 설정합니다. 이후에는 데이터 저장소 또는 API에 대해 최종 시퀀스를 검증할 수 있도록 웹훅을 추가합니다.
새 항목을 생성합니다. 여기에서는 모든 영숫자 입력을 수락하기 때문에 'alphanumeric'이라고 이름을 지정합니다.
정규 표현식 항목 상자를 선택합니다.
단일 항목 ^[a-zA-Z0-9]{3}[a-zA-Z0-9]*$를 추가합니다.
저장을 클릭합니다.
추가한 정규 표현식은 공백 또는 대시 없이 해당 영숫자 문자열만 검색한다는 점에서 매우 엄격합니다. 이것이 중요한 것은 두 가지 이유 때문입니다.
이 정규 표현식은 '한 글자씩 철자를 말하는 시퀀스' 인식기 모드를 사용 설정하기 위한 자동 음성 적응 요구사항을 따릅니다.
공백을 검색하지 않고 전체 문구(^...$)만 검색함으로써 최종 사용자가 시퀀스 인식을 쉽게 종료하도록 허용합니다. 예를 들어 '주문 번호를 알려주세요'로 프롬프트했을 때 최종 사용자가 '아니요, 주문을 하고 싶어요'라고 응답할 경우, 정규 표현식이 처리를 거부하고 Dialogflow가 이 문구와 일치할 수 있는 다른 인텐트를 검색해야 한다는 것을 알수 있습니다.
숫자 값에만 관심이 있을 때는 [0-9]{3}[0-9]*와 같은 보다 맞춤화된 항목을 만들거나 기본 제공되는 @sys.number-sequence 항목만 사용해도 됩니다.
이 가이드의 나머지 부분에서는 영숫자 시퀀스를 수집한다고 가정합니다. 이러한 시퀀스 수집을 위해 인텐트를 설정하는 방법을 알아보려면 다음 섹션으로 이동하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis tutorial guides users through setting up a Dialogflow agent to recognize alphanumeric sequences over voice input.\u003c/p\u003e\n"],["\u003cp\u003eUsers should first create a new Dialogflow agent, or use an existing one that has auto speech adaptation enabled in the agent settings.\u003c/p\u003e\n"],["\u003cp\u003eA regexp entity, named "alphanumeric," is created to recognize partial alphanumeric sequences, adhering to auto speech adaptation guidelines with the format \u003ccode\u003e^[a-zA-Z0-9]{3}[a-zA-Z0-9]*$\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe defined regexp entity strictly looks for strings of alphanumerics without spaces or dashes, allowing for recognition of spelled-out sequences and easy exit from sequence recognition.\u003c/p\u003e\n"],["\u003cp\u003eFor numeric-only values, the user could opt to make a more tailored entity like \u003ccode\u003e[0-9]{3}[0-9]*\u003c/code\u003e, or use the built-in \u003ccode\u003e@sys.number-sequence\u003c/code\u003e entity.\u003c/p\u003e\n"]]],[],null,["# Before you begin\n\nBefore trying this tutorial,\nyou should be familiar with Dialogflow basics covered in\n[Quickstarts](/dialogflow/docs/quick).\n\nCreate an agent\n---------------\n\nUse the [Dialogflow ES console](https://dialogflow.cloud.google.com) to create an agent named \"PackageTracker\".\nIf you are unsure how to do this,\nrevisit the [Quickstarts](/dialogflow/docs/quick).\n\nIf you prefer to work with an existing agent, that is okay too. Just be sure that you\n[enable auto speech adaptation](/dialogflow/es/docs/speech-adaptation#enable_or_disable_auto_speech_adaptation)\nin the agent settings. This is enabled by default for new agents.\n\nCreate a sequence recognizer entity\n===================================\n\nThe core function of this agent is understanding alphanumeric sequences over\nvoice. Specifically, you'll set up the agent to listen for a handful of characters\nat a time, eventually putting all sub-sequences together before validating the\nfinal sequence against a data store. Let's start by defining an entity to\nrecognize the partial sequences.\n\nCreate the regexp sequence entities\n-----------------------------------\n\nWe need to use a regexp entity to capture sequences so that auto speech\nadaptation will know to listen for \"ABC\" instead of \"a bee sea\".\n\nThese entities must conform to the\n[auto speech adaptation regexp enitity guidelines](/dialogflow/es/docs/speech-adaptation#regexp_entities)\nto ensure the speech recognition is tuned to recognize spelled-out sequences.\n\n### Partial sequence entity\n\nWe'll set up the entity to accept any alphanumeric sequence of at least 3\ncharacters. Later, you'll add a webhook so that you can validate the final\nsequence against a data store or API.\n\n1. Create a new entity. We'll name it \"alphanumeric\" because it will accept any alphanumeric input.\n2. Check the box for **Regexp entity**\n3. Add a single entry, `^[a-zA-Z0-9]{3}[a-zA-Z0-9]*$`\n4. Click **SAVE**.\n\nNotice that the regexp you added is very strict in that it is looking only for\na string of alphanumerics, without any spaces or dashes. This is important for\ntwo reasons:\n\n1. This regexp follows the auto speech adaptation [requirements](/dialogflow/es/docs/speech-adaptation#regexp_entities) for enabling the \"spelled-out sequence\" recognizer mode.\n2. By not looking for spaces and only looking for entire phrases (`^`...`$`), you allow end-users to easily exit the sequence recognition. For example, when you prompt \"what's your order number\" and an end-user replies \"no I want to place an order\", the regexp will reject and Dialogflow will know to look for another intent that might match that phrase.\n\nIf you are only interested in numeric values, you could create a more tailored\nentity like `[0-9]{3}[0-9]*`, or even just use the built-in `@sys.number-sequence`\nentity.\n\nThe rest of the tutorial assumes you are collecting alphanumeric sequences. Jump\nto the next section to see how to set up intents to collect these sequences."]]