BanglaBluetoothTTS Android Application
Project Book
Bluetooth Text-to-Speech Converter for Bangla Language
Submitted by: Tasmia Chowdhury Alif
Roll Number: 687817
Institution: National Institute Of Technology (NIT)
Department: Computer Science and Technology (CST)
Semester: 7th
Submission Date: 05/07/2025
Table of Contents
1. Project Overview and Details
2. Features & Functionalities
3. System Architecture
4. Coding Language and Source Code
5. Database Design
6. Algorithms
7. Flowcharts
8. Android App Components
9. Project Screenshots
10.Conclusion & Future Scope
1. Project Overview and Details
Project Description
BanglaBluetoothTTS is a specialized Android application designed to receive text data via
Bluetooth communication and convert it into audible Bangla speech. The app serves as a
communication bridge for external devices that send text data wirelessly, providing real-time
text-to-speech conversion with customizable voice parameters.
Project Objectives
• Develop a robust Bluetooth communication system for Android devices
• Implement native Bangla text-to-speech conversion
• Create an intuitive user interface for device pairing and text display
• Provide customizable speech parameters (pitch and speed control)
• Ensure seamless real-time data reception and processing
• Design an accessible application for users requiring text-to-speech services
Target Audience
• Users requiring Bluetooth-based text-to-speech services
• Assistive technology users
• Developers working with Bluetooth communication
• Educational institutions teaching Android development
• Accessibility-focused applications
2. Features & Functionalities
Core Application Features
Bluetooth Management
• Automatic Bluetooth Detection: Checks device Bluetooth availability and status
• Permission Handling: Requests necessary Bluetooth and location permissions
• Device Discovery: Scans for both paired and discoverable Bluetooth devices
• Connection Management: Establishes and maintains stable Bluetooth connections
• Real-time Status Updates: Provides visual feedback for connection status
Text-to-Speech Engine
• Bangla Language Support: Native Bengali text-to-speech conversion
• Real-time Processing: Instant speech synthesis upon text reception
• Voice Customization: Adjustable pitch and speed parameters
• Continuous Operation: Processes multiple text inputs sequentially
• Queue Management: Handles speech requests efficiently
User Interface Features
• Device List Display: Clean, organized list of available Bluetooth devices
• Large Text Display: High-visibility text area for received messages (70% screen height)
• Dual SeekBar Controls: 7-step pitch and speed adjustment controls
• Professional Layout: Intuitive design with proper spacing and typography
• Developer Attribution: Professional developer information display
Advanced Functionality
• Multi-threading: Separate threads for Bluetooth listening and UI updates
• Error Handling: Comprehensive error management for connection failures
• Memory Management: Efficient resource usage and cleanup
• Background Processing: Continuous data reception while app is active
Technical Specifications
• Minimum Android Version: Android 8.0 (API Level 26)
• Target SDK: Latest Android API
• Bluetooth Protocol: SPP (Serial Port Profile)
• Text Encoding: UTF-8 with Bangla character support
• Audio Output: Device speakers or connected audio devices
3. System Architecture
Application Architecture
The BanglaBluetoothTTS application follows a layered architecture approach:
1. Presentation Layer (UI Layer)
• Activity Management: MainActivity handles all user interactions
• Layout Management: XML-based responsive design
• View Components: ListView, TextView, SeekBar, and custom layouts
• User Input Processing: Touch events and SeekBar adjustments
2. Business Logic Layer
• Bluetooth Service: Device discovery, pairing, and connection management
• Text Processing: Data parsing and validation
• Speech Engine: TTS initialization and parameter management
• Threading: Background task management for real-time operations
3. Data Layer
• In-Memory Storage: Temporary data storage during app session
• Stream Processing: Real-time data reception via Bluetooth
• Configuration Management: Speech parameter storage
4. Communication Layer
• Bluetooth Protocol: RFCOMM socket communication
• Data Serialization: Text data encoding/decoding
• Connection Pooling: Efficient connection management
Design Patterns Used
• Model-View-Controller (MVC): Clear separation of concerns
• Observer Pattern: Event-driven programming for UI updates
• Strategy Pattern: Configurable speech parameters
• Factory Pattern: TTS engine initialization
4. Coding Language and Source Code
Development Environment
• Primary Language: Java (Android Native Development)
• IDE: Android Studio (Latest Version)
• Build System: Gradle Build System
• Target Platform: Android 8.0+ devices
• Development SDK: Android SDK with Bluetooth APIs
Project Structure
BanglaBluetoothTTS/
├── app/src/main/
│ ├── java/com/example/banglabluetoothtts/
│ │ └── MainActivity.java
│ ├── res/
│ │ ├── layout/
│ │ │ └── activity_main.xml
│ │ ├── values/
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ └── mipmap/
│ └── AndroidManifest.xml
├── build.gradle
└── gradle.properties
Key Source Code Analysis
MainActivity.java Features
• Bluetooth Management: Complete device discovery and connection handling
• TTS Integration: Bangla language text-to-speech implementation
• UI Management: Dynamic layout switching and real-time updates
• Permission System: Runtime permission handling for modern Android
• Error Handling: Comprehensive exception management
• Threading: Background data processing with UI thread communication
UI Design (activity_main.xml)
• Responsive Layout: LinearLayout with proper weight distribution
• Device List: ListView with custom styling and dividers
• Text Display: Large TextView with center alignment (38sp font size)
• Control Elements: Two SeekBars with descriptive labels
• Visual Hierarchy: Purple-themed color scheme with proper contrast
Permission Configuration (AndroidManifest.xml)
• Bluetooth Permissions: All necessary Bluetooth API permissions
• Location Permission: Required for device discovery on modern Android
• Backward Compatibility: Support for different Android versions
5. Database Design
Data Management Strategy
The BanglaBluetoothTTS application uses a stateless, real-time processing approach:
No Persistent Database
• Justification: Application processes data in real-time without need for storage
• Privacy: No text data is permanently stored, ensuring user privacy
• Performance: Reduced overhead and faster response times
• Simplicity: Eliminates database management complexity
In-Memory Data Handling
• Temporary Storage: Current session data stored in Java variables
• Configuration Storage: Speech parameters maintained in SeekBar states
• Connection State: Bluetooth connection status managed by Android framework
• Text Processing: Immediate processing without intermediate storage
Data Flow Model
Bluetooth Data → Real-time Processing → Text Display → Speech Synthesis
Data Types Handled
• Text Data: UTF-8 encoded strings with Bangla character support
• Configuration Data: Float values for pitch and speed settings
• Connection Data: Bluetooth device information and connection status
• UI State: Current application state and user preferences
6. Algorithms
Bluetooth Connection Algorithm
START
1. Initialize Bluetooth Adapter
2. Check if Bluetooth is available
IF NOT available:
- Show error message
- END
3. Check if Bluetooth is enabled
IF NOT enabled:
- Request user to enable Bluetooth
4. Check location permission (required for device discovery)
IF permission NOT granted:
- Request location permission
- Wait for user response
- IF permission denied:
- Show permission error
- END
5. Get list of paired devices
6. Start device discovery process
7. Populate device list with paired and discovered devices
8. Wait for user to select a device
9. Create RFCOMM socket for selected device
10. Attempt connection to device
11. IF connection successful:
- Switch to connected UI layout
- Start data listening thread
- Show success message
ELSE:
- Show connection error
- Return to device list
END
Text-to-Speech Processing Algorithm
START (Continuous Loop)
1. Receive text data via Bluetooth
2. Validate incoming text data
IF text is NOT valid:
- Log error
- Continue to next iteration
3. Switch to UI thread for interface updates
4. Display received text in TextView
5. Get current pitch value from SeekBar
6. Get current speed value from SeekBar
7. Configure TTS engine with current settings
8. Set language to Bangla (Bengali)
9. Apply pitch setting: pitch = (seekbar_value / 50.0) + 0.1
10. Apply speed setting: speed = (seekbar_value / 50.0) + 0.1
11. Speak the text using TTS engine
12. Return to listening state
13. Wait for next text input
REPEAT
SeekBar Control Algorithm
START (Event-Driven)
1. Detect SeekBar progress change event
2. Identify which SeekBar triggered the event
IF Pitch SeekBar:
- Calculate pitch value = (progress / 50.0) + 0.1
- Apply pitch to TTS engine
IF Speed SeekBar:
- Calculate speed value = (progress / 50.0) + 0.1
- Apply speed to TTS engine
3. Store current settings in memory
4. Update TTS engine parameters
5. Ready for next speech synthesis
END
Device Discovery Algorithm
START
1. Clear existing device lists and UI
2. Get paired Bluetooth devices from system
3. IF paired devices found:
- Add each device to device list
- Update UI with device names and addresses
ELSE:
- Show "No paired devices" message
4. Register broadcast receiver for device discovery events
5. Start Bluetooth device discovery process
6. WHILE discovery is active:
- Wait for device found events
- When new device found:
- Add device to list
- Update UI with new device
7. Continue until discovery timeout
8. Display complete device list to user
9. Wait for user selection
END
7. Flowcharts
Application Startup Flowchart
Device Connection Flowchart
Data Reception and Processing Flowchart
8. Android App Components
Core Android Components
1. Activity Component
• MainActivity: Single activity architecture
• Lifecycle Management: Proper onCreate, onDestroy handling
• State Management: UI state preservation during orientation changes
• Intent Handling: Bluetooth enable requests
2. Permission System
• Runtime Permissions: Modern Android permission model
• Bluetooth Permissions: BLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_CONNECT,
BLUETOOTH_SCAN
• Location Permission: Required for device discovery
• Permission Callbacks: User-friendly permission request handling
3. UI Components
• ListView: Custom adapter for device display
• TextView: Large text display with custom styling
• SeekBar: Dual controls for speech parameters
• LinearLayout: Responsive layout management
• Toast Messages: User feedback for actions
4. Background Services
• Thread Management: Background Bluetooth listening
• Data Processing: Real-time text processing
• TTS Service: Speech synthesis management
• Connection Monitoring: Bluetooth connection status
Android APIs Used
Bluetooth APIs
• BluetoothAdapter: Device management and discovery
• BluetoothDevice: Individual device representation
• BluetoothSocket: Communication channel
• BroadcastReceiver: Device discovery events
Text-to-Speech APIs
• TextToSpeech: Core TTS functionality
• Locale: Language configuration
• Speech Parameters: Pitch and speed control
UI APIs
• View Management: Dynamic layout switching
• Event Handling: User interaction processing
• Thread Communication: UI updates from background threads
Resource Management
• Layout Resources: XML-based UI definitions
• String Resources: Internationalization support
• Theme Resources: Consistent visual styling
• Drawable Resources: Custom UI elements
9. Project Screenshots
Figure 1: Bluetooth Permission Request Screen
Figure 2: Available Bluetooth Devices List
Figure 3: Main Page with Connection Status And Main Page Waiting for Text
Figure 4: Main Page Displaying Received Text
10. Conclusion & Future Scope
Project Conclusion
The BanglaBluetoothTTS Android application successfully demonstrates the integration of
Bluetooth communication technology with text-to-speech synthesis for the Bangla language. The
project achieves its core objectives of creating a robust, user-friendly mobile application that can
receive text data wirelessly and convert it to audible speech with customizable parameters.
Key Achievements
The project successfully implements:
• Seamless Bluetooth Integration: Robust device discovery, pairing, and connection management
• Native Bangla TTS Support: High-quality text-to-speech conversion in Bengali language
• Intuitive User Interface: Clean, accessible design with large text display and easy controls
• Real-time Processing: Immediate text reception and speech synthesis without delays
• Customizable Speech Parameters: User-controlled pitch and speed adjustments
• Comprehensive Error Handling: Graceful management of connection failures and permission
issues
Technical Accomplishments
• Modern Android Development: Utilizes latest Android APIs and best practices
• Multi-threading Implementation: Efficient background processing with UI responsiveness
• Memory Management: Optimal resource usage and proper cleanup procedures
• Cross-version Compatibility: Support for Android 8.0 and newer devices
• Professional Code Quality: Well-structured, maintainable, and documented code
Future Scope and Enhancements
1. Enhanced TTS Features
• Multiple Language Support: Add support for English, Hindi, and other regional languages
• Voice Selection: Multiple voice options for Bangla speech synthesis
• Emotion Recognition: Speech tone adjustment based on text content
• SSML Support: Speech Synthesis Markup Language for advanced speech control
2. Advanced Bluetooth Features
• Bluetooth Low Energy (BLE): Support for energy-efficient communication
• Multiple Device Connections: Simultaneous connections to multiple devices
• Automatic Reconnection: Smart reconnection to previously paired devices
• Device Filtering: Custom filters for specific device types
Market Potential
The BanglaBluetoothTTS application addresses a significant market need for:
• Assistive Technology: Supporting users with disabilities
• Educational Applications: Language learning and pronunciation tools
• IoT Integration: Smart home and device communication
• Healthcare Solutions: Medical device communication and alerts
Research Contributions
This project contributes to several research areas:
• Mobile Application Development: Modern Android development practices
• Human-Computer Interaction: Accessible interface design
• Bluetooth Communication: Wireless data transmission optimization
• Text-to-Speech Technology: Bangla language processing and synthesis
The successful implementation of BanglaBluetoothTTS demonstrates the practical application of
mobile technology in solving real-world communication challenges while providing a foundation
for future innovations in assistive technology and wireless communication systems.
Application Developed by: Tasmia Chowdhury Alif
App Download Link:
https://drive.google.com/drive/folders/1gcDAn72q7Hrwz7sOFXPlO98ZYKctoTjm?usp=sharing
GitHub Repository Link:[ https://github.com/Tasmia-Chowdhury-Alif/BanglaBluetoothTTS-
Using-Java/tree/main/Version%203%20(%20Full%20ready%20) ]