# Converting a tape-image into a audio file

## Introduction

A tape image is a file to be used with Amstrad CPC emulators. Most files have the file extension ".cdt", but some may also have the file extension ".tzx". The file format is defined using the "TZX" file specification. The file format describes the audio signal from a real Amstrad CPC cassette in a more compact form.

A tape image can be used on a real CPC if it is converted back into a audio signal. This document describes the method to do this.

## Method

The "playtzx" command-line utility can be used to convert a tape-image back into a audio file.

The command line required is:

    playtzx /voc /freq <frequency> <cdt/tzx filename> <voc filename>

replacing:

- "<frequency>" with the frequency of the output audio sample.
  - If you are transfering the audio file to a audio CD, then it is best to use a frequency of 44010Hz.
  - If you are playing the audio file through the sound card of your computer, then you can use a frequency of 22050Hz or 44010Hz.
- "<cdt/tzx filename>" with the filename of the CDT or TZX file.
- "<voc filename>" with the name of the output sample file.

e.g.

    playtzx /voc /freq 22050 zub.cdt zub.voc

This will convert the tape image "zub.cdt" into the VOC sample file "zub.voc".

(The VOC sample file can be converted into a WAV (PC) or AIFF (Mac) using a sample conversion program such as Goldwave.)