ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ทดสอบและแก้ไขข้อบกพร่อง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ต่อไปนี้คือคําแนะนําหลายประการที่ควรพิจารณาเมื่อจัดโครงสร้างโค้ด VIA เพื่อให้ทดสอบได้ง่ายขึ้น
จัดโครงสร้างฐานโค้ดเป็นหน่วยอิสระ
หน่วยหลัก ได้แก่
- การทริกเกอร์ คำสั่งให้ดำเนินการ Push-to-Talk (PTT) และ Tap-to-Talk (TTT)
- การจดจำเสียงพูด มุ่งเน้นที่การแปลงสตรีมเสียงเป็น Structured Data
- การดำเนินการตามคําสั่ง มุ่งเน้นที่การประมวลผลคําค้นหาและแปลเป็นการดำเนินการ
แต่ละเลเยอร์เหล่านี้ควรทดสอบได้ด้วยตัวเองและแยกจากกัน ระบุและบันทึกข้อมูลต่อไปนี้
- ข้อมูลเพิ่มเติมของ Intent ที่สามารถใช้เพื่อส่งคําค้นหาของผู้ใช้ไปยังเลเยอร์การดําเนินการตามคําสั่งได้โดยตรง ซึ่งจะช่วยให้ OEM และนักผสานรวมข้ามการจดจําเสียงและทดสอบการดําเนินการตามคําสั่ง (การผสานรวมรถยนต์) ได้โดยตรง
- กระบวนการส่งไฟล์เสียงที่บันทึกไว้ล่วงหน้าไปยังบริการการโต้ตอบด้วยเสียง ซึ่งจะช่วยให้ทดสอบการจดจำเสียงได้ด้วยตัวเองโดยไม่ต้องใช้ไมโครโฟนของยานพาหนะ
โปรแกรมจำลองสําหรับการทดสอบ
Android IDE เป็นแพลตฟอร์มที่ยอดเยี่ยมสําหรับการพัฒนาและการทดสอบ เนื่องจากเป็นบริดจ์ระหว่างไมโครโฟนของโฮสต์กับอินสแตนซ์ AAOS ของผู้มาเยือน

รูปที่ 1 การทดสอบโปรแกรมจำลอง
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# Test and debug\n\nFollowing are several recommendations to consider as you structure your VIA\ncode to make it easier to test.\n\nArchitect the code base into independent units\n----------------------------------------------\n\nPrimary units include:\n\n- **Triggering.** Hotwording, Push-to-Talk (PTT) and Tap-to-Talk (TTT).\n- **Voice recognition.** Focused on converting audio streams into structured data.\n- **Command fulfillment.** Focused into processing a query and translate it into an action.\n\nEach of these layers should be testable on its own and independent from each\nother. Include and document:\n\n- Intent extras that can be used to pass user queries directly to the command fulfillment layer. This would allow OEMs and integrators to skip the voice recognition and test command fulfillment (car integrations) directly.\n- A process to pass prerecorded audio files into the Voice Interaction service, allowing to test voice recognition on its own, skipping the vehicle microphone.\n\nEmulator for testing\n--------------------\n\n[Android\nEmulator](https://developer.android.com/studio/run/emulator) is an excellent platform for development and testing as it provides bridging\nbetween the host microphone and the guest AAOS instance.\n\n**Figure 1.** Emulator testing"]]