Kể từ ngày 13 tháng 6 năm 2023, Hành động trò chuyện không còn được dùng nữa. Để biết thêm thông tin, hãy xem phần Hành động trò chuyện ngừng hoạt động.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thư viện âm thanh chứa các âm thanh được phân loại mà bạn có thể dùng để nâng cao trải nghiệm người dùng và tăng độ tinh tế cho hành động của mình. Google lưu trữ các âm thanh này cho bạn. Vì vậy, bạn chỉ cần tham chiếu các âm thanh đó trong thuộc tính src của phần tử <audio> khi sử dụng SSML.
Đoạn mã sau đây cho bạn biết cách sử dụng các âm thanh này với thư viện ứng dụng 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);
};
Chọn một hàng để biết thêm chi tiết và nghe đoạn âm thanh hoặc tìm kiếm âm thanh
trong danh mục
Điều khoản và điều kiện
Việc bạn sử dụng thư viện âm thanh này (bao gồm cả các tệp nhạc trong thư viện này) phải tuân thủ Điều khoản dịch vụ của Actions on Google. Âm thanh và âm nhạc
trong thư viện này chỉ dành cho bạn sử dụng trong những Hành động mà bạn tạo.
Bằng việc tải xuống bản nhạc từ thư viện này, bạn đồng ý rằng bạn sẽ không:
Cho phép, phân phối hoặc biểu diễn các tệp âm thanh và nhạc từ thư viện này riêng biệt với các Hành động mà bạn đã kết hợp các tệp âm thanh và nhạc này trên các nền tảng của Google, bao gồm cả Actions on Google (ví dụ: phân phối riêng những tệp này hoặc sử dụng trên các nền tảng không phải của Google).
Sử dụng trái phép các tệp âm thanh và nhạc trong thư viện này hoặc liên quan đến bất kỳ nội dung bất hợp pháp nào.
[null,null,["Cập nhật lần gần đây nhất: 2023-05-16 UTC."],[],[],null,["The 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\nNode.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\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."]]