Résoudre les problèmes liés à la bibliothèque de l'Assistant Google
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
<ph type="x-smartling-placeholder">
Installer/Mettre à niveau la bibliothèque
Vous recevez un message d'erreur semblable à E: Unable to locate package python3-venv.
lorsque vous essayez de configurer
un nouvel environnement virtuel Python.
Dans les anciennes versions d'Ubuntu, le méta-package pour l'environnement virtuel Python 3
(python3-venv) n'est pas disponible. Utilisez une version complète
à la place:
sudo apt-get install python3-dev python3.4-venv
Vous recevez un message d'erreur semblable à No matching distribution found.
ou <wheel> is not a supported wheel on this platform.
Vérifiez l'architecture matérielle:
uname -a Linux raspberrypi 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux
La bibliothèque n'est compatible qu'avec le matériel équipé de linux-armv7l et linux-x86_64.
de l'infrastructure. Pour tout autre matériel, utilisez le service Assistant Google.
à la place.
Problèmes liés aux identifiants
Lorsque vous essayez de générer des identifiants avec l'outil d'autorisation, vous y êtes invité
d'accéder à une URL et de vous connecter à votre compte Google. La page affiche ensuite
s'affiche (par exemple, "Un problème est survenu").
L'Assistant répond Je ne sais pas comment vous aider sur ce point ou Je ne peux pas vous aider
comprendre.
Vérifiez que votre voix a été reconnue correctement. Vérifier l'exemple de code
pour obtenir une transcription
de la requête de l'utilisateur. Vous pouvez également consulter
mon activité. Toi
peut lire le contenu audio reçu par l'Assistant pour vérifier la qualité audio
les problèmes de performances. Si vous entendez un bruit excessif ou si le son est déformé, vérifiez
pour vérifier que votre micro est correctement configuré ou essayer un autre
à l'aide d'un micro.
Problèmes de caractéristique
L'Assistant ne reconnaît pas une caractéristique que vous avez ajoutée à un modèle.
Si vous avez généré une instance d'appareil pour un modèle, l'instance d'appareil ne sera pas
se mettent à jour automatiquement lorsque son modèle est modifié par d'autres utilisateurs. Vous devez
réenregistrer manuellement l'instance de l'appareil à l'aide de l'outil de ligne de commande "registration" ;
ou l'API REST.
Vous trouverez l'
ID d'instance de l'appareil
dans la sortie de l'exemple.
Problèmes liés aux actions sur l'appareil
L'Assistant Google répond en disant que votre application n'est pas compatible avec votre
appareil.
Dans la console Actions, vous pouvez
peut définir les fonctionnalités de surface de votre application Assistant. Si vous définissez l'écran
sortie est requise, vos actions personnalisées ne fonctionneront pas. La console Google
Le SDK de l'Assistant n'est pas compatible avec les fonctionnalités d'écran pour le moment.
Problèmes liés aux mots clés
L'Assistant ne semble pas répondre aux phrases commençant par Ok Google ou
Hey Google.
Si la reconnaissance de votre voix est toujours faible, voire inexistante, essayez d'effectuer un calibrage
la sensibilité de votre micro:
Arrêtez (Ctrl+C) tout exemple de code en cours d'exécution.
Exécutez la commande suivante :
export ASSISTANT_MIC_SENSITIVITY=-6
Exécutez l'exemple de code, puis réessayez. Revenez à l'étape 1, mais continuez à baisser
la valeur ASSISTANT_MIC_SENSITIVITY par intervalles de -6 (par exemple, -6, -12,
-18, -24...) jusqu'à ce que la reconnaissance vocale soit optimale. Si vous
à -60, vérifiez votre micro.
Problèmes liés aux alarmes et aux minuteurs
L'Assistant ne suit pas les commandes vocales (par exemple, mettre en pause
ou l'arrêt d'un minuteur).
Cela pose problème si le bouton StartStop
ou OnOff activée pour une
en fonction du modèle d'appareil. Supprimer cette caractéristique du modèle de l'appareil et utiliser oralement
commandes fonctionnent.
Problèmes de lecture des podcasts et des actualités
L'Assistant ne suit pas les commandes de lecture (par exemple, mettre en pause
ou d'arrêter un podcast).
Cela pose problème si le bouton StartStop
ou OnOff pour une caractéristique donnée
modèle d'appareil. Supprimer cette caractéristique du modèle d'appareil et des commandes de lecture
fonctionne correctement.
Problèmes de diffusion
L'Assistant ne peut pas diffuser de messages d'un appareil à un autre.
Assurez-vous de définir la position de l'appareil dans l'application Assistant Google.
Les deux appareils doivent avoir la même adresse dans l'application.
Assistance
Vous rencontrez toujours des problèmes ? Consultez notre page Assistance.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003eThe Google Assistant Library for Python is deprecated; use the Google Assistant Service instead.\u003c/p\u003e\n"],["\u003cp\u003eThe library is supported only on hardware with linux-armv7l and linux-x86_64 architectures.\u003c/p\u003e\n"],["\u003cp\u003eFor credential issues, ensure the Google Assistant API is enabled and the OAuth consent screen is configured.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshoot voice recognition by checking audio quality, microphone configuration, and user request transcript.\u003c/p\u003e\n"],["\u003cp\u003eFor device action issues, avoid requiring screen output in the Actions Console, as the SDK doesn't currently support it.\u003c/p\u003e\n"]]],["The Google Assistant Library for Python is deprecated; use the Google Assistant Service instead. Common issues include: virtual environment errors (install `python3-dev python3.4-venv`), hardware architecture mismatch (only `linux-armv7l` and `linux-x86_64` supported), credential errors (enable the API and OAuth), permission problems (set activity controls), voice recognition problems (check audio quality and microphone), trait issues (register traits and re-register devices), device action problems (don't require screen output), hotword issues (adjust mic sensitivity), and issues with certain traits (remove `StartStop` and `OnOff` traits).\n"],null,["# Troubleshooting the Google Assistant Library\n\n| **Warning:** The Google Assistant Library for Python is deprecated as of June 28th, 2019. Use the [Google Assistant Service](/assistant/sdk/guides/service/python) instead.\n\n\u003cbr /\u003e\n\nInstalling/upgrading the library\n--------------------------------\n\nYou get an error message similar to `E: Unable to locate package python3-venv`\nwhile trying to configure a new Python virtual environment.\n\n- On older versions of Ubuntu, the meta package for the Python 3 virtual\n environment (`python3-venv`) is not available. Use a fully-qualified version\n instead:\n\n ```\n sudo apt-get install python3-dev python3.4-venv\n ```\n\nYou get an error message similar to `No matching distribution found`\nor `\u003cwheel\u003e is not a supported wheel on this platform`.\n\n- Check the hardware architecture:\n\n ```\n uname -a\n Linux raspberrypi 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux\n ```\n\n \u003cbr /\u003e\n\n The library is only supported on hardware with linux-armv7l and linux-x86_64\n architectures. For other hardware, use the [Google Assistant Service](/assistant/sdk/overview#sdk_components)\n instead.\n\nCredentials issues\n------------------\n\nWhen trying to generate credentials with the authorization tool, the tool prompts\nyou to visit a URL and sign in to your Google account. The page then displays an\nerror message (for example, \"Something went wrong\").\n\n- Make sure you enabled the Google Assistant API and configured the OAuth consent screen in [Configure a Developer Project and Account Settings](/assistant/sdk/guides/library/python/embed/config-dev-project-and-account#config-dev-project).\n\nPermissions issues\n------------------\n\nThe Google Assistant responds *Actually, there are some basic settings that need\nyour permission first...*\n\n- [Set activity controls](/assistant/sdk/guides/activity-controls) for the account that you used when setting the authorization code.\n\nVoice recognition issues\n------------------------\n\nAssistant responds *I don't know how to help with that* or *I don't\nunderstand.*\n\n- Verify that your voice was recognized properly. Check the sample code output for a transcript of the user request. You can also look at [my activity](https://myactivity.google.com/myactivity?restrict=vaa). You can play the audio received by the Assistant to check for audio quality issues. If you hear excessive noise or if the audio is distorted, check that your microphone is configured properly or try a different microphone.\n\nTrait issues\n------------\n\nAssistant does not recognize a trait that you added to a model.\n\n- Make sure the trait was added to the model\n (see [Register Traits for the\n Device](/assistant/sdk/guides/library/python/extend/register-device-traits)).\n\n- If you generated a device instance for a model, the device instance will **not**\n automatically update when its model is changed by other users. You need to\n manually re-register the device instance using the [registration command line tool](/assistant/sdk/reference/device-registration/device-tool#register-device)\n or the [REST API](/assistant/sdk/reference/device-registration/register-device-manual#register-instance).\n You can find the\n [device instance ID](/assistant/sdk/guides/library/python/embed/run-sample#get-device-id)\n in the output of the sample.\n\nDevice Actions issues\n---------------------\n\nThe Google Assistant responds saying that your app is not supported on your\ndevice.\n\n- In the [Actions Console](https://console.actions.google.com/), you can set the surface capabilities of your Assistant app. If you set screen output to be required, your custom actions will not function. The Google Assistant SDK does not support screen capabilities at this time.\n\nHotword issues\n--------------\n\nAssistant does not seem to respond to sentences that begin with *Ok Google* or\n*Hey Google*.\n\n- If you still get little to no recognition of your voice, try calibrating\n your microphone sensitivity:\n\n 1. Terminate (Ctrl+C) any sample code that is currently running.\n 2. Run the following command: \n\n ```\n export ASSISTANT_MIC_SENSITIVITY=-6\n ```\n 3. Run the sample code and try again. Go back to step 1, but keep lowering the `ASSISTANT_MIC_SENSITIVITY` value in intervals of -6 (e.g., -6, -12, -18, -24...) until you find that voice recognition is optimal. If you get to -60, check your microphone.\n\nAlarms and timers issues\n------------------------\n\nThe Assistant does not follow verbal commands (for example, pausing\nor stopping a timer).\n\n- This is an issue if you have the [StartStop](/assistant/sdk/reference/traits/startstop) or [OnOff](/assistant/sdk/reference/traits/onoff) trait enabled for a given device model. Remove this trait from the device model and verbal commands will work.\n\nPodcast and news playback issues\n--------------------------------\n\nThe Assistant does not follow playback commands (for example, pausing\nor stopping a podcast).\n\n- This is an issue if you have the [StartStop](/assistant/sdk/reference/traits/startstop) or [OnOff](/assistant/sdk/reference/traits/onoff) trait enabled for a given device model. Remove this trait from the device model and playback commands will work.\n\nBroadcast issues\n----------------\n\nThe Assistant cannot broadcast messages from one device to the other.\n\n- Make sure to set the device location in the Google Assistant [app](/assistant/sdk/reference/assistant-app/assistant-settings). Both devices must have the same address in the app.\n\nSupport\n-------\n\nStill having trouble? See our [Support](/assistant/sdk/support) page."]]