Creative Voice audio file
application/octet-stream
Magic Bytes
Offset: 0
43 72 65 61 74 69 76 65 20 56 6F 69 63 65 20 46 69 6C 65 1A 1A 00
The Creative Voice (VOC) format is a proprietary audio container developed by Creative Labs for its line of Sound Blaster sound cards. This file type was extensively utilized to store digital sound samples and recorded speech in early DOS-based video games and multimedia applications. Although now considered a legacy format, it is generally safe for modern use and remains recognized by specialized media players for historical preservation and data recovery purposes.
Validation Code
How to validate .voc files in Python
Python
def is_voc(file_path: str) -> bool:
"""Check if file is a valid VOC by magic bytes."""
signature = bytes([0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x56, 0x6F, 0x69, 0x63, 0x65, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x1A, 0x1A, 0x00])
with open(file_path, "rb") as f:
return f.read(22) == signature
How to validate .voc files in Node.js
Node.js
function isVOC(buffer: Buffer): boolean {
const signature = Buffer.from([0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x56, 0x6F, 0x69, 0x63, 0x65, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x1A, 0x1A, 0x00]);
return buffer.subarray(0, 22).equals(signature);
}
Go
func IsVOC(data []byte) bool {
signature := []byte{0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x56, 0x6F, 0x69, 0x63, 0x65, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x1A, 0x1A, 0x00}
if len(data) < 22 {
return false
}
return bytes.Equal(data[:22], signature)
}
API Endpoint
GET
/api/v1/voc
curl https://filesignature.org/api/v1/voc