Recipe catalog / style-kind
Identify a musical style
What style does the described passage or request evoke?
A passage or a listener's request is described in text and you need one of a fixed set of broad styles to steer what comes next or to label what was played.
Explore this recipe interactively ยท Source and implementation guide
Use style-kind in TypeScript
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { styleKind } from 'jev-recipes/style-kind';
const result = await styleKind({
"description": "Walking bass in the left hand under extended seventh and ninth chords, swung eighth notes, a ii-V-I turnaround every four bars, right hand improvising around the changes with chromatic approach tones.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| description | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"description"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"classical",
"jazz",
"blues",
"pop",
"electronic",
"folk",
"unclear"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"classical",
"jazz",
"blues",
"pop",
"electronic",
"folk",
"unclear"
]
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"required": [
"classical",
"jazz",
"blues",
"pop",
"electronic",
"folk",
"unclear"
]
}
},
"required": [
"model",
"usage",
"status",
"verdict",
"confidence",
"probabilities"
],
"additionalProperties": false
}
}Saved example result
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo style-kind.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"verdict": "jazz",
"confidence": 0.92,
"probabilities": {
"classical": 0.02,
"jazz": 0.92,
"blues": 0.03,
"pop": 0.01,
"electronic": 0,
"folk": 0,
"unclear": 0.02
}
}
Evaluation evidence
No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.
Use the evaluation guide to measure this decision on your own labeled cases.
Limitations
- Labels the style the description evokes, not the historical or commercial genre of any real recording. Sub-genres and fusions collapse to the nearest broad style or to unclear.
- Reads the words of description only; it cannot hear audio or check that the description is accurate.
- A description that lists notes and chords without any stylistic markers lands on unclear rather than being guessed.
Related recipes
- document-role: Use document-role to identify the purpose of a document rather than the musical style a description evokes.
- audience-fit: Use audience-fit to check whether material suits a described audience rather than which style it belongs to.