Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tentang interaksi suara
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Voice Interaction Service API menyediakan abstraksi atas berbagai
aplikasi kontrol suara potensial. Implementasi dapat dikembangkan dengan mengikuti panduan
yang dijelaskan dalam
Pengembangan aplikasi.
Konten dalam panduan integrasi ini menjelaskan cara mengintegrasikan aplikasi ini ke dalam
system image Android Automotive OS (AAOS) tertentu.
Terminologi
Istilah-istilah berikut digunakan di seluruh panduan ini:
- Data bantuan. Saat sesi interaksi suara dimulai,
sistem dapat mengambil tampilan dan screenshot, serta meneruskan informasi ini
ke sesi. Aplikasi dapat mengekspos informasi tambahan dengan menerapkan
Activity#onProvideAssistData()
dan Activity#onProvideAssistContent()
.
- Push-to-talk (PTT). Tombol kontrol suara fisik, biasanya
terletak di setir.
- RecognitionService (RS). Layanan pengenalan suara yang digunakan oleh
aplikasi melalui
SpeechRecognizer
API. VIA harus menyertakan VoiceInteractionService
dan
RecognitionService
.
- Ketuk untuk bicara (TTT). Tombol kontrol suara software, biasanya
disertakan sebagai bagian dari UI sistem). Di Android, hal ini juga disebut sebagai
Gesture Bantuan.
VoiceInteractionService
. Layanan sistem ringan yang diterapkan oleh developer VIA. Layanan yang dipilih terikat
dari layanan sistem saat booting, dan selalu berjalan.
- VoiceInteractionSession (VIS). Class ini mengenkapsulasi
logika bisnis interaksi pengguna. Class ini bertanggung jawab untuk menampilkan
status interaksi suara kepada pengguna, menangani permintaan VoiceInteractor, dan menerima
data bantuan dan screenshot.
- VoiceInteractionSessionService (VSS). Layanan, bagian dari
VIA, yang bertanggung jawab untuk menangani sesi interaksi suara. Layanan ini terikat
dari layanan sistem Android selama interaksi suara dengan pengguna. Semua
logika bisnis sesi ini diterapkan di class
VoiceSession
.
Layanan ini hanya dijamin akan tetap aktif selama sesi suara satu pengguna.
- Aplikasi Interaksi Suara (VIA). Aplikasi Android yang dirancang
untuk berfungsi sebagai kontrol suara (disebut sebagai asisten). Aplikasi ini dapat
diidentifikasi dengan menyertakan
VoiceInteractionService
dalam manifesnya.
Hanya satu dari aplikasi ini yang dapat dipilih sebagai default dalam satu waktu di sistem.
Hanya aplikasi default yang akan dipertahankan agar tetap aktif (terikat dari layanan sistem), dan
akan menjadi penerima peristiwa Push-To-Talk (PTT)
atau Tap-To-Talk (TTT).
Tanggung jawab
Tabel ini menjelaskan tanggung jawab setiap pihak.
Produsen Mobil (OEM) |
AOSP |
Developer Aplikasi |
- Buat sistem infotainment yang kompatibel
dengan AAOS.
- Terapkan input dan output audio, secara opsional termasuk dukungan deteksi
kata kunci panas DSP.
- Memberikan izin hak istimewa sistem untuk layanan interaksi suara.
- Patuhi persyaratan
VoiceInteractionService terkait akses ke
layar setelan aplikasi.
|
- Menentukan dan mengembangkan
VoiceInteractionService dan API terkait.
- Memberikan dokumentasi API, contoh kode, dan materi dukungan lainnya kepada
developer VIA.
- Berikan panduan UX dengan persyaratan dan rekomendasi.
|
- Terapkan
VoiceInteractionService API, RecognitionService API, dan
NotificationListenerService API (lihat deskripsi mendetail di
Pengembangan aplikasi).
- Berikan UI yang dapat disesuaikan yang dapat disesuaikan oleh OEM agar cocok dengan setiap
sistem desain mobil.
|
Persyaratan UX
OEM memiliki tanggung jawab utama untuk memberikan pengalaman pengguna yang baik kepada pelanggan.
OEM harus memastikan bahwa semua layanan interaksi suara yang diprainstal memenuhi
persyaratan yang dijelaskan dalam
Asisten yang Dimuat Sebelumnya: Panduan UX.
Pengalaman asisten inti
Aplikasi Interaksi Suara (VIA) otomotif melakukan tindakan berikut:
- [HARUS] Respons pemicu interaksi suara yang ditangani sistem (PTT, TTT).
- [HARUS] Menampilkan representasi visual progresnya (misalnya, memproses,
memenuhi, dan memproses).
- [HARUS] Gunakan suara atau bunyi untuk menunjukkan pemahaman dan penyelesaian permintaan
pengguna.
- [HARUS] Berfungsi sebagai pengenal ucapan untuk aplikasi lain (lihat SpeechRecognizer
API).
- [HARUS] Merespons pemicu kata cepat.
- [MAY] Menampilkan aktivitas setelan tempat pengguna dapat mengonfigurasi VIA ini (misalnya,
izin, konfigurasi kata kunci panas, dan login).
- [MAY] Menangani data bantuan (
Intent#ACTION_ASSIST
)
- [MAY] Mendukung interaksi suara dari Pelindung Kunci (layar kunci).
Komponen
Pada tingkat tinggi, aplikasi interaksi suara berinteraksi dengan aktor berikut:

Gambar 1. Aktor interaksi suara
Detail:
VoiceInteractionManagerService
. Layanan sistem ini bertanggung jawab untuk
mengelola VIA default, dan mengekspos fungsinya ke seluruh sistem.
RecognitionService
. Layanan ini mengekspos kemampuan pengenalan
ucapan ke aplikasi lain dalam sistem.
SoundTrigger
. Mengimplementasikan pengelolaan kata kunci panas dan
tersedia untuk VIA melalui AlwaysOnHotwordDetector.
MediaRecorder
. Memberikan akses ke input audio untuk
deteksi kata kunci panas (saat menggunakan CPU) dan pengenalan ucapan.
PhoneWindowManager
/CarInputService
. Layanan
ini bertanggung jawab (di antara hal lainnya) untuk menangani peristiwa utama, merutekan
PTT ke VIA, melalui VoiceInteractionManagerService
.
User
. Pengguna berinteraksi dengan VIA melalui Pemicu
(PTT, TTT, Hotword) atau UI Voice Plate.
- CarService, Notifications, Media, Telephony, ContactsProvider, dan sebagainya.
Layanan dan aplikasi yang digunakan oleh VoiceInteractionSession untuk
memenuhi perintah pengguna.
Konsep khusus otomotif
AAOS berbeda dengan Android dalam aspek berikut:
- Selain fungsi Asisten normal, VIA AAOS dapat mengontrol fungsi
kendaraan (misalnya, HVAC, kursi, dan lampu interior). Fungsi ini
dapat diintegrasikan menggunakan CarPropertyManager API (lihat selengkapnya di Membaca
properti kendaraan) asalkan OEM mengonfigurasi akses dengan benar seperti yang dijelaskan dalam
Daftar yang diizinkan untuk izin dengan hak istimewa.
- Penyesuaian dan konsistensi lebih relevan di Otomotif daripada
faktor bentuk lainnya. Lihat
Penyesuaian
untuk membaca selengkapnya tentang cara menerapkan panduan ini.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# About voice interaction\n\nThe Voice Interaction Service API provides an abstraction over different\npotential voice control apps. Implementations can be developed following the guidelines\ndescribed in\n[App development](/docs/automotive/voice/voice_interaction_guide/app_development).\nThe content in this integration guide describes how to integrate these apps into\na specific Android Automotive OS (AAOS) system image.\n\nTerminology\n-----------\n\nThese terms are used through this guide:\n\n- **Assist data.** When a voice interaction session is started, the system is able to capture views and screenshots, and pass this information to the session. Apps can expose additional information by implementing [Activity#onProvideAssistData()](https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)) and [Activity#onProvideAssistContent()](https://developer.android.com/reference/android/app/Activity#onProvideAssistContent(android.app.assist.AssistContent)).\n- **[Push-to-talk (PTT)](https://developer.android.com/reference/android/service/voice/VoiceInteractionSession#SHOW_SOURCE_PUSH_TO_TALK)**. Physical voice control button, usually located in the steering wheel.\n- **RecognitionService (RS).** Voice recognition service used by apps through the [SpeechRecognizer](https://developer.android.com/reference/android/speech/SpeechRecognizer)`\n ` API. VIAs must include both the `VoiceInteractionService` *and* the `RecognitionService`.\n- **[Tap-to-talk (TTT)](https://developer.android.com/reference/android/service/voice/VoiceInteractionSession#SHOW_SOURCE_ASSIST_GESTURE)** . Software voice control button, usually included as part of the system UI). In Android this is also referred to as *Assist Gesture*.\n- **[VoiceInteractionService](https://developer.android.com/reference/android/service/voice/VoiceInteractionService)**. Lightweight system service implemented by the VIA developer. The selected service is bound from system service on boot, and is always running.\n- **VoiceInteractionSession (VIS).** This class encapsulates the user interaction business logic. It is responsible for presenting the user with status of the voice interaction, handling VoiceInteractor requests and receiving assist and screenshot data.\n- **VoiceInteractionSessionService (VSS).** A service, part of a VIA, responsible for handling a voice interaction session. This service is bound from Android's system service during a voice interaction with a user. All business logic of this session is implemented in the `VoiceSession` class. This service is only guaranteed to stay alive during a single user voice session.\n- **Voice Interaction App (VIA).** Android app designed to serve as a voice control (referred to as *assistant* ). These apps can be identified by including a `VoiceInteractionService` in their manifest. Only one of these apps can be selected as *default* at a time in the system. Only the default app will be maintained alive (bound from a system service), and will be the receiver of [Push-To-Talk (PTT)](https://developer.android.com/reference/android/service/voice/VoiceInteractionSession#SHOW_SOURCE_PUSH_TO_TALK) or [Tap-To-Talk (TTT)](https://developer.android.com/reference/android/service/voice/VoiceInteractionSession#SHOW_SOURCE_ASSIST_GESTURE) events.\n\nResponsibilities\n----------------\n\nThis table describes the responsibilities of each party.\n\n| Car Manufacturers (OEMs) | AOSP | App Developers |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| - Build a [compatible](/compatibility/android-cdd) infotainment system with AAOS. - Implement audio input and output, optionally including DSP hotword detection support. - Grant system-privileged permissions for the voice interaction services. - Respect `VoiceInteractionService` requirements regarding access to app's settings screens. | - Define and evolve `VoiceInteractionService` and related APIs. - Provide API documentation, sample code and other support material to VIA developers. - Provide UX guidance with requirements and recommendations. | - Implement `VoiceInteractionService` API, RecognitionService API and NotificationListenerService API (see detailed description at [App development](/docs/automotive/voice/voice_interaction_guide/app_development)). - Provide a customizable UI that can be adjusted by OEMs to match each car design system. |\n\nUX requirements\n---------------\n\nOEMs have the ultimate responsibility of providing a good user experience to customers.\nOEMs must ensure that the all pre-installed voice interaction services fulfill the\nrequirements described in\n[Preloaded Assistants: UX Guidance](/static/docs/automotive/voice/voice_interaction_guide/preloaded-assistants_UX-guidelines.pdf).\n\nCore assistant experience\n-------------------------\n\nAn automotive Voice Interaction Application (VIA) performs the following actions:\n\n- \\[MUST\\] Respond to system-handled voice interaction triggers (PTT, TTT).\n- \\[MUST\\] Display a visual representation of their progress (for example, listening, processing, and fulfilling).\n- \\[MUST\\] Use voice or sounds to indicate understanding and completion of user requests.\n- \\[MUST\\] Serve as a speech recognizer for other apps (see the [SpeechRecognizer\n API](https://developer.android.com/reference/android/speech/SpeechRecognizer)).\n- \\[SHOULD\\] Respond to a hotword trigger.\n- \\[MAY\\] Display a settings activity where users can configure this VIA (for example, permissions, hotword configuration, and sign-in).\n- \\[MAY\\] Handle assist data ([Intent#ACTION_ASSIST](https://developer.android.com/reference/android/content/Intent#ACTION_ASSIST))\n- \\[MAY\\] Support voice interaction from Keyguard (lock screen).\n\nComponents\n----------\n\nAt a high level, a voice interaction app interacts with these actors:\n\n**Figure 1.** Voice interaction actors\n\nDetails:\n\n- `VoiceInteractionManagerService`. This system service is responsible for managing the default VIA, and exposing its functionality to the rest of the system.\n- `RecognitionService`. This service exposes speech recognition capabilities to other apps in the system.\n- `SoundTrigger`. Implements hotword management and it's available to VIAs through the AlwaysOnHotwordDetector.\n- `MediaRecorder`. Provides access to audio input for both hotword detection (when using CPU) and speech recognition.\n- `PhoneWindowManager`/`CarInputService`. These services are responsible (among other things) for handling key events, routing PTT to the VIA, by means of the `VoiceInteractionManagerService`.\n- `User`. The user interacts with a VIA by means of Triggers (PTT, TTT, Hotword) or the Voice Plate UI.\n- **CarService, Notifications, Media, Telephony, ContactsProvider, and so on.** Services and apps used by the VoiceInteractionSession to fulfill the user's commands.\n\nAutomotive-specific concepts\n----------------------------\n\nAAOS diverges from Android in the following aspects:\n\n- Besides normal Assistant functionalities, AAOS VIAs can control vehicle functions (for example, HVAC, seats, and interior lights). These functionalities can be integrated using the CarPropertyManager API (see more at [Read a\n vehicle property](/docs/automotive/voice/voice_interaction_guide/fulfilling_commands#vehicle-property)) provided OEMs configure access correctly as described in [Privileged permission allowlisting](/docs/core/permissions/perms-allowlist).\n- Customization and consistency are more relevant in Automotive than in any other form factor. See [Customization](/docs/automotive/voice/voice_interaction_guide/integration_flows#customization) to read more about implementing these guidelines."]]