Documentation Index
Fetch the complete documentation index at: https://mintlify.com/soymatudev/Pokedex-Fleek/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Voice Narration feature brings Pokédex entries to life using expo-speech for text-to-speech synthesis. The voice is configured to sound like Dexter from the Pokémon anime, with specific pitch and rate settings optimized for Spanish narration.Implementation
The voice functionality is encapsulated in a custom React hook:useDexterVoice.
Hook Structure
Voice Configuration
Language Settings
The voice is configured for Mexican Spanish (es-MX):Dexter Voice Parameters
The voice settings are tuned to mimic Dexter’s robotic yet analytical tone:- Pitch:
0.57- Lower than default to create a deeper, more mechanical voice - Rate:
1.2- Slightly faster than normal speech for clarity and efficiency
Usage in Details Screen
The voice narration is triggered automatically when Pokémon details are loaded:Text Processing
Before narration, the flavor text is cleaned:\f) that sometimes appear in PokéAPI flavor text.
Message Format
The complete narration includes the Pokémon name followed by the description:“Pikachu. Cuando varios de estos Pokémon se juntan, su energía puede causar fuertes tormentas.”
Stopping Narration
The hook provides a function to stop ongoing narration:Speech.stop() from expo-speech.
Timing Sequence
The narration is carefully timed with other audio elements:- Pokémon details are fetched from API
- Pokémon cry audio plays immediately
- 800ms delay
- Dexter voice narration begins
Voice Quality
Thees-es-x-eea-network voice provides:
- Natural Spanish pronunciation
- Network-based synthesis for higher quality
- Consistent delivery across devices
Customization Options
You can adjust the voice characteristics by modifying the options:Example Variations
More robotic (lower pitch):expo-speech API
The hook uses two main expo-speech functions:Speech.speak(text, options)
Plays the text with specified voice settings.
Speech.stop()
Immediately stops any ongoing speech synthesis.
See Also
- Pokédex Entries - Where voice narration is triggered
- expo-speech documentation