از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
تست و رفع اشکال
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در زیر چندین توصیه وجود دارد که باید هنگام ساختار کد VIA خود در نظر بگیرید تا آزمایش آن را آسانتر کنید.
پایه کد را به واحدهای مستقل معمار کنید
واحدهای اولیه عبارتند از:
- محرک. Hotwording، Push-to-Talk (PTT) و Tap-to-Talk (TTT).
- تشخیص صدا. تمرکز بر تبدیل جریان های صوتی به داده های ساخت یافته.
- اجرای دستور. تمرکز بر پردازش یک پرس و جو و ترجمه آن به یک عمل.
هر یک از این لایه ها باید به تنهایی و مستقل از یکدیگر قابل آزمایش باشند. شامل و مستند:
- Intent های اضافی که می توانند برای ارسال پرس و جوهای کاربر مستقیماً به لایه اجرای دستور استفاده شوند. این به OEM ها و ادغام کنندگان اجازه می دهد تا از تشخیص صدا و اجرای دستورات آزمایشی (ادغام خودرو) به طور مستقیم صرف نظر کنند.
- فرآیندی برای ارسال فایلهای صوتی از پیش ضبطشده به سرویس تعامل صوتی، که امکان آزمایش تشخیص صدا را به تنهایی و با نادیده گرفتن میکروفون خودرو فراهم میکند.
شبیه ساز برای تست
شبیه ساز اندروید یک پلتفرم عالی برای توسعه و آزمایش است زیرا پل ارتباطی بین میکروفون میزبان و نمونه AAOS مهمان را فراهم می کند.

شکل 1. آزمایش شبیه ساز
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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"]]