ojas121 commited on
Commit
ace00d7
Β·
verified Β·
1 Parent(s): 0dd8395

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +84 -0
app.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Set dark mode
4
+ st.set_page_config(page_title="Speech Detection System", page_icon="πŸŽ™", layout="wide")
5
+
6
+ # Custom CSS for dark theme and styling
7
+ st.markdown(
8
+ """
9
+ <style>
10
+ body {
11
+ color: white;
12
+ background-color: #0e1117;
13
+ }
14
+ .stApp {
15
+ background-color: #0e1117;
16
+ }
17
+ .title {
18
+ text-align: center;
19
+ font-size: 2.5rem;
20
+ font-weight: bold;
21
+ color: #1db954;
22
+ }
23
+ .subheading {
24
+ font-size: 1.5rem;
25
+ font-weight: bold;
26
+ color: #f4f4f4;
27
+ text-align: center;
28
+ }
29
+ .description {
30
+ font-size: 1.1rem;
31
+ text-align: center;
32
+ color: #d1d1d1;
33
+ margin-bottom: 20px;
34
+ }
35
+ .feature-card {
36
+ background-color: #22272e;
37
+ padding: 15px;
38
+ border-radius: 10px;
39
+ box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.1);
40
+ margin: 10px;
41
+ }
42
+ </style>
43
+ """,
44
+ unsafe_allow_html=True
45
+ )
46
+
47
+ # Title
48
+ st.markdown("<div class='title'>πŸŽ™ Speech Detection System</div>", unsafe_allow_html=True)
49
+
50
+ # Description
51
+ st.markdown(
52
+ """
53
+ <div class='description'>
54
+ Speech detection systems utilize various datasets to analyze and interpret spoken language.
55
+ These systems perform **acoustic analysis** to identify pitch, tone, and volume, while **speech recognition** converts audio into text.
56
+ **Noise filtering** enhances clarity by removing background sounds, and **emotional detection** determines the speaker's mood based on vocal tone.
57
+ **Real-time processing** ensures live detection with minimal delay. The use of **multilingual** and **diverse environmental datasets**
58
+ improves adaptability and accuracy, making these systems ideal for applications like **virtual assistants, sentiment analysis, and voice-controlled systems**.
59
+ </div>
60
+ """,
61
+ unsafe_allow_html=True
62
+ )
63
+
64
+ # Features
65
+ st.markdown("<div class='subheading'>πŸ” Key Features</div>", unsafe_allow_html=True)
66
+
67
+ features = [
68
+ ("🎡 Acoustic Analysis", "Identifies pitch, tone, and volume. Processes sound waveforms to extract unique speech characteristics."),
69
+ ("😊 Emotional Detection", "Detects emotions such as happiness, anger, or neutrality from vocal tone."),
70
+ ("πŸ—£ Speech Recognition", "Converts spoken words into text using advanced algorithms. Detects languages and keywords."),
71
+ ("⚑ Real-Time Processing", "Enables live speech detection with minimal latency for fast, accurate responses."),
72
+ ("πŸ”‡ Noise Filtering", "Removes background noise, ensuring clearer speech recognition and analysis."),
73
+ ("🌍 Dataset Diversity", "Utilizes multilingual and environmental datasets for robust, adaptable speech detection."),
74
+ ]
75
+
76
+ # Display features in two columns
77
+ cols = st.columns(2)
78
+ for i, (title, desc) in enumerate(features):
79
+ with cols[i % 2]: # Distribute features evenly
80
+ st.markdown(f"<div class='feature-card'><b>{title}</b><br>{desc}</div>", unsafe_allow_html=True)
81
+
82
+ # Footer
83
+ st.markdown("---")
84
+ st.markdown("<div style='text-align: center; font-size: 0.9rem;'>Built with ❀️ using Streamlit</div>", unsafe_allow_html=True)