Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
La bibliothèque de sons contient des sons catégorisés que vous pouvez utiliser pour améliorer l'expérience utilisateur et affiner vos actions. Google héberge ces sons pour vous. Il vous suffit donc de les référencer dans l'attribut src d'un élément <audio> lorsque vous utilisez SSML.
L'extrait de code suivant vous montre comment utiliser ces sons avec la bibliothèque cliente Node.js:
Node.js
function playAudio(conv) {
let text_to_speech = '<speak>'
+ 'I can play a sound'
+ '<audio src="https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg">a digital watch alarm</audio>. '
+ '</speak>'
conv.add(text_to_speech);
};
Sélectionnez une ligne pour obtenir plus d'informations et écouter l'extrait audio, ou rechercher des sons dans le catalogue
Conditions d'utilisation
Votre utilisation de cette bibliothèque audio (y compris les fichiers musicaux qu'elle contient) est soumise aux Conditions d'utilisation d'Actions on Google. Les sons et la musique de cette bibliothèque sont réservés à votre utilisation dans les actions que vous créez.
En téléchargeant des titres de cette bibliothèque, vous vous engagez à ne pas :
Rendre disponibles, distribuer ou exécuter les fichiers audio et musicaux de cette bibliothèque séparément des actions dans lesquelles vous les avez intégrés, sur les plates-formes Google, y compris Actions on Google (par exemple, la distribution indépendante de ces fichiers, ou l'utilisation de plates-formes autres que Google, n'est pas autorisée).
Utilisez les fichiers audio et musicaux de cette bibliothèque de manière illégale ou en lien avec un contenu illégal.
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 2023/05/16 (UTC).
[null,null,["Dernière mise à jour le 2023/05/16 (UTC)."],[],[],null,["# Sound Library\n\nThe sound library contains categorized sounds that you can use to enhance the\nuser experience and increase the polish of your actions. Google hosts these\nsounds for you, so all you need to do is reference them in the `src` attribute\nof an `\u003caudio\u003e` element when using [SSML](/assistant/conversational/ssml).\n\nThe following code snippet shows you how to use these sounds with the Node.js\nclient library: \n\n### Node.js\n\n```javascript\nfunction playAudio(conv) {\n let text_to_speech = '\u003cspeak\u003e'\n + 'I can play a sound'\n + '\u003caudio src=\"https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg\"\u003ea digital watch alarm\u003c/audio\u003e. '\n + '\u003c/speak\u003e'\n conv.add(text_to_speech);\n};\n```\n| **Note:** You can also search and listen to these sound effects in the [YouTube Audio Library](https://www.youtube.com/audiolibrary/soundeffects). The sounds here are hosted here for you, so you can reference their locations directly in your app.\n\nSelect a row for more details and to hear the sound clip, or search for sounds\nin the catalog \n\nTerms and Conditions\n--------------------\n\nYour use of this sound library (including the music files in this library) is\nsubject to the [Actions on Google Terms of Service](https://developers.google.com/terms/). Sounds and music\nfrom this library are intended solely for use by you in Actions that you create.\n\nBy downloading music from this library, you agree that you will not:\n\n- Make available, distribute or perform the sound and music files from this library separately from Actions into which you have incorporated these sound and music files, on Google platforms including Actions on Google (e.g. standalone distribution of these files, or use on non-Google platforms, is not permitted).\n- Use the sound and music files from this library in an illegal manner or in connection with any illegal content."]]