Spaces:
Runtime error
Runtime error
import app | |
def test_transcribe_audio_to_text(): | |
input_audio_file = "test_audio_input.wav" | |
expected_transcribed_text = "your expected transcription" | |
result = app.transcribe_audio_to_text(input_audio_file) | |
assert result == expected_transcribed_text | |
def test_call_chatgpt_api(): | |
prompt = "What is the meaning of life?" | |
system_prompt = "Yoda:" | |
expected_response = "your expected chatgpt response" | |
result = app.call_chatgpt_api(prompt, system_prompt) | |
assert result == expected_response | |
def test_text_to_speech_yoda(): | |
input_text = "Do or do not, there is no try." | |
output_audio_file = "test_audio_output.mp3" | |
app.text_to_speech_yoda(input_text, output_audio_file) | |
assert os.path.exists(output_audio_file) | |
def test_process_audio(): | |
input_audio_file = "test_audio_input.wav" | |
output_audio_file = "test_audio_output.mp3" | |
system_prompt = "Yoda:" | |
app.process_audio(input_audio_file, output_audio_file, system_prompt) | |
assert os.path.exists(output_audio_file) | |