Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	File size: 801 Bytes
			
			| 3baa9da | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 'use client';
import React from "react";
interface ASRResultDisplayProps {
  result: any;
  ready: boolean | null;
  task: string;
}
export const ASRResultDisplay = ({ result, ready }: ASRResultDisplayProps) => {
  
  if (ready === false) {
    return <div className="text-gray-400">Loading model...</div>;
  }
  if (!result) {
    return <div className="text-gray-400">No transcription yet.</div>;
  }
  if (result.error) {
    return <div className="text-red-500">Error: {result.error}</div>;
  }
  return (
    <div className="w-full text-lg text-gray-800 break-words">
      <span className="font-semibold">Transcript:</span>
      <div className="mt-2 bg-gray-100 p-3 rounded-lg">
        
        {result.text || "No text found."}
      </div>
    </div>
  );
}; | 
