File size: 895 Bytes
a459327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
import os
import sys
from app import process_audio

def main():
    """
    Example function to demonstrate the application with a sample audio file.
    
    Usage:
    python example.py <path_to_audio_file>
    """
    if len(sys.argv) != 2:
        print("Usage: python example.py <path_to_audio_file>")
        return
    
    audio_file = sys.argv[1]
    if not os.path.exists(audio_file):
        print(f"Error: File {audio_file} does not exist.")
        return
    
    print(f"Processing audio file: {audio_file}")
    
    # Call the main processing function
    genre_results, lyrics = process_audio(audio_file)
    
    # Print results
    print("\n" + "="*50)
    print("GENRE CLASSIFICATION RESULTS:")
    print("="*50)
    print(genre_results)
    
    print("\n" + "="*50)
    print("GENERATED LYRICS:")
    print("="*50)
    print(lyrics)

if __name__ == "__main__":
    main()