voice2text/test_download.php
DJP 846693b097 Initial commit: Voice to Text with Whisper & DeepL Translation
Features:
- OpenAI Whisper for audio transcription
- DeepL API for translation (30+ languages)
- Multiple output formats: TXT, VTT, SRT
- Flask Python API backend
- PHP frontend with black/gold theme
- Support for 350MB files
- Generates both original and translated files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 11:54:39 -04:00

41 lines
1.3 KiB
PHP

<?php
/**
* Test download functionality
*/
// List all files in outputs directory
$outputDir = __DIR__ . '/outputs/';
echo "<h2>Files in outputs directory:</h2>";
echo "<ul>";
if (is_dir($outputDir)) {
$files = scandir($outputDir);
foreach ($files as $file) {
if ($file !== '.' && $file !== '..' && $file !== '.DS_Store') {
$filepath = $outputDir . $file;
$size = filesize($filepath);
$readable = is_readable($filepath) ? 'Yes' : 'No';
$extension = pathinfo($file, PATHINFO_EXTENSION);
echo "<li>";
echo "<strong>$file</strong><br>";
echo "Size: " . number_format($size) . " bytes<br>";
echo "Readable: $readable<br>";
echo "Extension: $extension<br>";
echo "<a href='download.php?file=" . urlencode($file) . "' target='_blank'>Test Download</a>";
echo "</li><br>";
}
}
} else {
echo "<li>Directory not found</li>";
}
echo "</ul>";
// Test file operations
echo "<h2>Directory permissions:</h2>";
echo "Directory: $outputDir<br>";
echo "Exists: " . (is_dir($outputDir) ? 'Yes' : 'No') . "<br>";
echo "Readable: " . (is_readable($outputDir) ? 'Yes' : 'No') . "<br>";
echo "Writable: " . (is_writable($outputDir) ? 'Yes' : 'No') . "<br>";
?>