{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/zero-shot-audio-captioning-with-audio","title":"Zero-shot audio captioning with audio-language model guidance and audio context keywords","arxiv_id":"2311.08396","date":"2023-11-14","proceeding":null,"authors":["Leonard Salewski","Stefan Fauth","A. Sophia Koepke","Zeynep Akata"],"abstract":"Zero-shot audio captioning aims at automatically generating descriptive textual captions for audio content without prior training for this task. Different from speech recognition which translates audio content that contains spoken language into text, audio captioning is commonly concerned with ambient sounds, or sounds produced by a human performing an action. Inspired by zero-shot image captioning methods, we propose ZerAuCap, a novel framework for summarising such general audio signals in a text caption without requiring task-specific training. In particular, our framework exploits a pre-trained large language model (LLM) for generating the text which is guided by a pre-trained audio-language model to produce captions that describe the audio content. Additionally, we use audio context keywords that prompt the language model to generate text that is broadly relevant to sounds. Our proposed framework achieves state-of-the-art results in zero-shot audio captioning on the AudioCaps and Clotho datasets. Our code is available at https://github.com/ExplainableML/ZerAuCap.","url_abs":"https://arxiv.org/abs/2311.08396v1","url_pdf":"https://arxiv.org/pdf/2311.08396v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"zero-shot-audio-captioning-with-audio","repo_url":"https://github.com/explainableml/zeraucap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"audio-captioning","task_name":"Audio captioning"},{"task_slug":"descriptive","task_name":"Descriptive"},{"task_slug":"image-captioning","task_name":"Image Captioning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"speech-recognition","task_name":"Speech Recognition"},{"task_slug":"zero-shot-audio-captioning","task_name":"Zero-shot Audio Captioning"},{"task_slug":"speech-recognition-1","task_name":"speech-recognition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/zero-shot-audio-captioning-on-audiocaps","task":"Zero-shot Audio Captioning","dataset":"AudioCaps","model":"ZerAuCap","rank_in_archive_order":2,"of":4,"metrics":{"BLEU-4":"6.8","CIDEr":"28.1","METEOR":"12.3","ROUGE-L":"33.1","SPICE":"8.6","SPIDEr":"18.3"},"uses_additional_data":true},{"leaderboard":"/sota/zero-shot-audio-captioning-on-audiocaps","task":"Zero-shot Audio Captioning","dataset":"AudioCaps","model":"No audio (baseline)","rank_in_archive_order":4,"of":4,"metrics":{"BLEU-4":"0","CIDEr":"0.1","METEOR":"4.1","ROUGE-L":"17.8","SPICE":"0","SPIDEr":"0"},"uses_additional_data":false},{"leaderboard":"/sota/zero-shot-audio-captioning-on-clotho","task":"Zero-shot Audio Captioning","dataset":"Clotho","model":"ZerAuCap","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-4":"2.9","CIDEr":"14","METEOR":"9.4","ROUGE-L":"25.4","SPICE":"5.3","SPIDEr":"9.7"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.08396","atlas_url":"https://app.syntology.ai/?focus=2311.08396","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.08396"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/explainableml/zeraucap","reach":{"status":"ok"}}],"summary":{"ran":13,"unverified":4},"by_repo_kind":{"official":{"samples":17,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":17,"samples":[{"code_sha256_prefix":"393efe21b22bf554","entry":"batch","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/sound_obj_generator.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/sound_obj_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"393efe21b22bf554"}},{"code_sha256_prefix":"5b343139acd21835","entry":"build_mask_matrix","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/loss_func.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/loss_func.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b343139acd21835"}},{"code_sha256_prefix":"7eedca5ad3fd9e77","entry":"clean_chat_gpt_response","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/sound_obj_generator.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/sound_obj_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7eedca5ad3fd9e77"}},{"code_sha256_prefix":"961114eca9f332c1","entry":"compute_valid_token_num","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/loss_func.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/loss_func.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"961114eca9f332c1"}},{"code_sha256_prefix":"dbe18b03333fa2bc","entry":"contrastive_loss","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/loss_func.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/loss_func.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dbe18b03333fa2bc"}},{"code_sha256_prefix":"46798ca8cd2b7123","entry":"get_chat_gpt_answers","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/sound_obj_generator.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/sound_obj_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46798ca8cd2b7123"}},{"code_sha256_prefix":"583f7e4fab57b315","entry":"get_prompt_id","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/inference_magic.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/inference_magic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"583f7e4fab57b315"}},{"code_sha256_prefix":"01cd1d45e20261ed","entry":"load_AudioClip","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/load_clip_model.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/load_clip_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"01cd1d45e20261ed"}},{"code_sha256_prefix":"8c75381e91da6e52","entry":"load_CLAP","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/load_clip_model.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/load_clip_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c75381e91da6e52"}},{"code_sha256_prefix":"56d5003b7ee3900b","entry":"parse_prompt","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/utlis.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/utlis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"56d5003b7ee3900b"}},{"code_sha256_prefix":"1d8ca634885a9ffb","entry":"sorting_function_keyword_lists","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/evaluation/join_test_results.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/evaluation/join_test_results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d8ca634885a9ffb"}},{"code_sha256_prefix":"96370a572229a5a9","entry":"top_k_top_p_filtering","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/utlis.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/utlis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96370a572229a5a9"}},{"code_sha256_prefix":"315ad037a2faafbf","entry":"typical_filtering","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/language_model/utlis.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/language_model/utlis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"315ad037a2faafbf"}},{"code_sha256_prefix":"6e5afc29fdf09196","entry":"load_WavCaps","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/load_clip_model.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/load_clip_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e5afc29fdf09196"}},{"code_sha256_prefix":"5dc63fbe479018d6","entry":"preprocess_for_AudioCLIP","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/audio_preprocessors.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/audio_preprocessors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5dc63fbe479018d6"}},{"code_sha256_prefix":"f57277edc12fc6dc","entry":"preprocess_for_CLAP","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/audio_preprocessors.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/audio_preprocessors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f57277edc12fc6dc"}},{"code_sha256_prefix":"089cf8fe536c8934","entry":"preprocess_for_WavCaps","repo":"explainableml/zeraucap","repo_kind":"official","path":"audio_captioning/clip/audio_preprocessors.py","file_url":"https://github.com/explainableml/zeraucap/blob/HEAD/audio_captioning/clip/audio_preprocessors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"089cf8fe536c8934"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}