Authors: Woody Haosheng Gan¹, William Held²'³, Diyi Yang²
¹University of Southern California, ²Stanford University, ³OpenAthena
HUMANS: HUman-aligned Minimal Audio evaluatioN Subsets for Large Audio Models
This repo is part of the Putting HUMANS first: Efficient LAM Evaluation with Human Preference Alignment paper.
HUMANS Benchmark is designed to efficiently evaluate Large Audio Models using minimal subsets while predicting human preferences through learned regression weights.
from HUMANS import HUMANSEvaluator, Message, ModelResponse
# Initialize evaluator
evaluator = HUMANSEvaluator(
dataset_name="woodygan/humans-benchmark",
subset="n50"
)
# Define your model's prediction function
def predict_fn(messages, audio_output, text_output, tools=None, tool_choice="auto"):
# Your model inference code here
return ModelResponse(text="response", audio_path=None, tool_calls=None)
# Run evaluation
results = evaluator.evaluate(predict_fn=predict_fn, mode="both")
# human_overall_score is the primary score to report for model comparison
print(f"Human Preference Score (overall): {results['human_overall_score']:.4f}")
print(f"Human Understanding Score: {results['human_understanding_score']:.4f}")
print(f"Human Naturalness Score: {results['human_naturalness_score']:.4f}")
print(f"Human Response Quality Score: {results['human_response_quality_score']:.4f}")
print(f"Human Task Effectiveness Score: {results['human_task_effectiveness_score']:.4f}")
print(f"Benchmark Score: {results['benchmark_score']:.4f}")pip install git+https://github.com/Woodygan/humans-benchmark.gitgit clone https://github.com/Woodygan/humans-benchmark.git
cd humans-benchmark
pip install -e .- Python 3.8+
- OpenAI API key (required): Used for LLM-based metrics across all tasks. Cost: ~$0.1 per evaluation
- Google API key (optional): Used for SpeakBench evaluation following the original framework. If not provided, falls back to OpenAI models.
Option 1: Using a .env file (recommended)
Create a .env file in your project directory:
OPENAI_API_KEY=your-openai-api-key-here
GOOGLE_API_KEY=your-google-api-key-here # OptionalOption 2: Using export in your shell
export OPENAI_API_KEY='your-openai-api-key-here'
export GOOGLE_API_KEY='your-google-api-key-here' # Optionalhumans-benchmark/
├── src/
│ └── HUMANS/
│ ├── __init__.py # Package exports
│ ├── evaluator.py # Main HUMANSEvaluator class
│ ├── message.py # Message and ModelResponse dataclasses
│ ├── whisper.py # Whisper transcription utilities
│ ├── cava/ # CAVA benchmark metrics
│ │ └── metric.py
│ ├── dynamic_superb/ # Dynamic Superb metrics
│ │ └── metric.py
│ ├── speakbench/ # SpeakBench metrics
│ │ └── metric.py
│ ├── ultraeval/ # UltraEval metrics
│ │ └── metric.py
│ └── wildspeech/ # WildSpeech metrics
│ └── metric.py
├── example/
│ └── example.py # Complete working example
├── requirements.txt # Package dependencies
├── pyproject.toml # Package configuration
├── setup.py # Setup script
└── README.md # This file
We provide a complete working example that demonstrates how to evaluate GPT-4o Audio Preview on the HUMANS benchmark.
# Navigate to the example directory
cd example
# Run the example
python example.pyThe example demonstrates:
- Initializing the HUMANSEvaluator
- Implementing a prediction function for OpenAI's GPT-4o Audio Preview
- Handling audio input/output
- Supporting function calling tasks
- Evaluating the model and saving results
Note: Make sure you have set your OPENAI_API_KEY environment variable before running the example.
evaluator = HUMANSEvaluator(
dataset_name: str = "woodygan/humans-benchmark",
subset: str = "n50",
cache_dir: Optional[str] = None,
audio_dir: str = "humans-audio",
delete_audio_on_cleanup: bool = False
)Parameters:
-
dataset_name(str): HuggingFace dataset identifier- Default:
"woodygan/humans-benchmark"
- Default:
-
subset(str): Evaluation subset to use- Options:
"n10","n20","n30","n50","n100","n200" - Default:
"n50" - Larger subsets provide more accurate evaluation but take longer
- Options:
-
cache_dir(Optional[str]): Directory to cache the downloaded dataset- Default:
None(uses HuggingFace default cache)
- Default:
-
audio_dir(str): Directory to save temporary audio files during evaluation- Default:
"humans-audio" - Audio files are stored here for processing by metrics
- Default:
-
delete_audio_on_cleanup(bool): Whether to automatically delete audio directory when evaluator is destroyed- Default:
False - Set to
Trueto automatically clean up audio files after evaluation
- Default:
results = evaluator.evaluate(
predict_fn: Callable,
mode: str = "both",
save_results: bool = True,
results_path: Optional[str] = None,
verbose: bool = True
)Parameters:
-
predict_fn(Callable): Your model's prediction function (see below for detailed specification)- Required
- Function signature:
predict_fn(messages, audio_output, text_output, tools=None, tool_choice="auto") -> ModelResponse
-
mode(str): Evaluation mode"human": Compute human preference scores only (0-1 scale, one per dimension)"benchmark": Compute full benchmark score approximation"both": Compute both scores (default)
-
save_results(bool): Whether to save results to a JSON file- Default:
True
- Default:
-
results_path(Optional[str]): Path to save the results JSON file- Default:
None(auto-generates filename with timestamp:humans_results_YYYYMMDD_HHMMSS.json)
- Default:
-
verbose(bool): Show progress bar and logging during evaluation- Default:
True
- Default:
Returns:
A dictionary containing:
{
# Human preference scores — one per dimension (if mode="human" or "both")
# human_overall_score is the primary score to report for model comparison
"human_overall_score": 0.75, # ← primary score
"human_understanding_score": 0.70,
"human_naturalness_score": 0.78,
"human_response_quality_score": 0.72,
"human_task_effectiveness_score": 0.69,
# Benchmark score (if mode="benchmark" or "both")
"benchmark_score": 0.68,
# Metadata
"num_items": 50,
"subset": "n50",
"audio_dir": "/path/to/audio",
"results_path": "/path/to/results.json", # if save_results=True
# Per-item evaluation details
"details": [
{
"item_id": "item_001",
"task": "speech_recognition",
"dataset": "dynamic_superb",
"metric": "word_error_rate",
"score": 0.85,
"audio_output_expected": False,
"text_output_expected": True,
"latency": 1.23, # Response time in seconds
"metadata": { # Task-specific metadata
"error_type": None,
"reference": "ground truth text"
}
},
# ... more items
]
}Your predict_fn must implement the following interface:
def predict_fn(
messages: List[Message],
audio_output: bool,
text_output: bool,
tools: Optional[List[Dict[str, Any]]] = None,
tool_choice: str = "auto"
) -> ModelResponse:
"""
Model prediction function for HUMANS benchmark.
Args:
messages: List of conversation messages (Message objects)
audio_output: Whether the task expects audio output
text_output: Whether the task expects text output
tools: Optional list of tool/function definitions for function calling tasks
tool_choice: Tool choice strategy - "auto", "required", or "none"
Returns:
ModelResponse object with model outputs
"""
# Your model inference logic here
passA list of Message objects representing the conversation history:
@dataclass
class Message:
role: Literal["user", "assistant", "system", "tool"]
text_input: Optional[str] = None # Text content
audio_path: Optional[str] = None # Path to audio file (.wav)
tool_calls: Optional[List[Dict]] = None # Function calls from assistant (OpenAI format)
tool_call_id: Optional[str] = None # ID matching the tool call (for OpenAI API models)
name: Optional[str] = None # Function name (for Gemini and other models)Field Descriptions:
tool_call_id: Used in tool response messages to match back to the original function call. Required for OpenAI API models (matches the"id"field from the assistant's tool_calls)name: Function name used in tool response messages. Required for models like Gemini that identify function responses by name instead of ID
Message Examples:
# User message with text only
Message(role="user", text_input="What is the weather?")
# User message with audio input
Message(role="user", text_input="Transcribe this:", audio_path="/path/to/audio.wav")
# Assistant message with tool calls (OpenAI format)
Message(role="assistant", text_input="Let me check the weather",
tool_calls=[{
"id": "call_123",
"type": "function",
"function": {
"name": "get_weather",
"arguments": {"location": "San Francisco"} # Dictionary, not JSON string!
}
}])
# Tool response message (includes both tool_call_id and name for compatibility)
Message(role="tool", text_input="Sunny, 72°F",
tool_call_id="call_123", # For OpenAI models
name="get_weather") # For Gemini and similar modelsThese boolean flags indicate what type of output the task expects:
audio_output=True: Task requires audio response (e.g., speech synthesis, voice conversion)text_output=True: Task requires text response (e.g., speech recognition, classification)- Both can be
Truefor tasks requiring both modalities
For function calling tasks, the benchmark provides tool definitions and expects responses in OpenAI API compatible format.
tools: List of available function definitions following OpenAI function calling format:
[
{
"type": "function",
"function": {
"name": "function_name",
"description": "Function description",
"parameters": {
"type": "object",
"properties": {
"param1": {"type": "string", "description": "..."},
# ... more parameters
},
"required": ["param1"]
}
}
}
]Note: This format is compatible with OpenAI API. If your model uses a different format (e.g., Google's function calling format), you'll need to convert between formats in your predict_fn.
tool_choice: Strategy for function calling (OpenAI API compatible)"auto": Model decides whether to call functions"required": Model must call at least one function"none": Model should not call functions
Return a ModelResponse object:
@dataclass
class ModelResponse:
text: str # Text output (required, use "" if none)
audio_path: Optional[str] = None # Path to generated audio file (.wav)
tool_calls: Optional[List[Dict]] = None # Function calls (see format below)
metadata: Optional[Dict] = None # Optional metadataFunction Call Format (IMPORTANT - READ CAREFULLY):
When your model calls functions, return them in OpenAI API compatible format. This is a specific format that you must follow exactly:
tool_calls = [
{
"id": "call_abc123", # Unique call ID (optional) - used by your model to match tool
# responses back to the original call (required in
# OpenAI API). Some models like Gemini use the function
# name instead of ID for matching.
"type": "function", # Always "function" (required)
"function": {
"name": "function_name", # Function name (string) - also used for matching tool
# responses in models like Gemini
"arguments": { # Arguments as a DICTIONARY (NOT a JSON string!)
"param1": "value1", # Each argument as a key-value pair
"param2": 42
}
}
}
]Important Notes:
- For OpenAI models: The
"id"field is used to match tool responses back to the original function call - For Google Gemini and similar models: The
"name"field is used for matching instead of"id". We include both fields to support different model architectures - Arguments format: The
"arguments"field MUST be a Python dictionary, NOT a JSON string. If your model API returns arguments as a JSON string (like OpenAI does), parse it withjson.loads()before returning - Multi-turn function calling: The evaluator automatically handles the conversation loop - you don't need to implement this yourself
- Function responses: The evaluator provides function responses for testing purposes
The benchmark evaluates models across multiple datasets and tasks:
Dataset Items Include:
item_id: Unique identifier (original line index in full dataset)position: Position in subset (unique per row, even for duplicate items)task: Task name (e.g., "speech_recognition", "emotion", "function_calling")dataset: Source dataset nameprompt: Text instruction/prompt for the modelmetric: Evaluation metric usedaudio_input: Input audio (if applicable)text_input: Input text prompt (if applicable)audio_reference: Reference/ground truth audio (if applicable)text_reference: Reference/ground truth text in list format (e.g.,text_reference[0]for single answer)audio_output: Whether task expects audio outputtext_output: Whether task expects text outputfull_benchmark_weight: Weight for full benchmark score approximationoverall_human_preference_weight/overall_human_regression_bias: Weights and bias for overall human preference (primary dimension)understanding_human_preference_weight/understanding_human_regression_bias: Weights and bias for understanding dimensionnaturalness_human_preference_weight/naturalness_human_regression_bias: Weights and bias for naturalness dimensionresponse_quality_human_preference_weight/response_quality_human_regression_bias: Weights and bias for response quality dimensiontask_effectiveness_human_preference_weight/task_effectiveness_human_regression_bias: Weights and bias for task effectiveness dimension
Available Subsets:
n10: 10 evaluation items (fast, less accurate)n20: 20 evaluation itemsn30: 30 evaluation itemsn50: 50 evaluation items (default)n100: 100 evaluation itemsn200: 200 evaluation items
To manually delete the audio directory after evaluation:
evaluator.cleanup_audio()Or set delete_audio_on_cleanup=True during initialization for automatic cleanup.
MIT License
- Paper: ACL Anthology
- Dataset: HuggingFace Dataset
- Repository: GitHub
- Issues: Bug Tracker
@inproceedings{gan2026putting,
title={Putting HUMANS first: Efficient LAM Evaluation with Human Preference Alignment},
author={Gan, Woody Haosheng and Held, William Barr and Yang, Diyi},
booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
pages={39132--39174},
year={2026}
} This benchmark builds upon several existing audio evaluation frameworks:
@misc{cava2025,
title = {CAVA: Comprehensive Assessment of Voice Assistants},
author = {Held, Will and Ryan, Michael J. and Shrivastava, Aditya and Khan, Ali Sartaz and Ziems, Caleb and Li, Ella and Bartelds, Martijn and Sun, Michael and Li, Tan and Gan, Woody and Yang, Diyi},
year = {2025},
url = {https://talkarena.org/cava},
howpublished = {\url{https://github.com/SALT-NLP/CAVA}},
note = {A benchmark for evaluating large audio models (LAMs) capabilities across six domains: turn taking, instruction following, function calling, tone awareness, safety, and latency}
}
@article{huang2024dynamic,
title={Dynamic-superb phase-2: A collaboratively expanding benchmark for measuring the capabilities of spoken language models with 180 tasks},
author={Huang, Chien-yu and Chen, Wei-Chih and Yang, Shu-wen and Liu, Andy T and Li, Chen-An and Lin, Yu-Xiang and Tseng, Wei-Cheng and Diwan, Anuj and Shih, Yi-Jen and Shi, Jiatong and others},
journal={arXiv preprint arXiv:2411.05361},
year={2024}
}
@article{he2024ultraeval,
title={Ultraeval: A lightweight platform for flexible and comprehensive evaluation for llms},
author={He, Chaoqun and Luo, Renjie and Hu, Shengding and Zhao, Yuanqian and Zhou, Jie and Wu, Hanghao and Zhang, Jiajie and Han, Xu and Liu, Zhiyuan and Sun, Maosong},
journal={arXiv preprint arXiv:2404.07584},
year={2024}
}
@article{manakul2025audiojudge,
title={AudioJudge: Understanding What Works in Large Audio Model Based Speech Evaluation},
author={Manakul, Potsawee and Gan, Woody Haosheng and Ryan, Michael J and Khan, Ali Sartaz and Sirichotedumrong, Warit and Pipatanakul, Kunat and Held, William and Yang, Diyi},
journal={arXiv preprint arXiv:2507.12705},
year={2025}
}
@article{zhang2025wildspeech,
title={WildSpeech-Bench: Benchmarking Audio LLMs in Natural Speech Conversation},
author={Zhang, Jian and Zhang, Linhao and Lei, Bokai and Wu, Chuhan and Jia, Wei and Zhou, Xiao},
journal={arXiv preprint arXiv:2506.21875},
year={2025}
}