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
TheuseDexterVoice hook provides text-to-speech (TTS) functionality for the PokéDex app, delivering Pokémon information in Spanish with a distinctive robotic voice character. It uses expo-speech to synthesize speech with custom voice parameters optimized for clarity and character.
Import
Usage
Return Values
The hook returns an object with the following methods:hablarEntrada(texto, nombrePokemon)
Speaks the provided text with the Pokémon’s name in Spanish using TTS.
Parameters:
texto(string) - The Pokémon description or information to speaknombrePokemon(string) - The name of the Pokémon
- Cleans the text by removing form feed characters (
\f) - Prepends the Pokémon name to the description
- Speaks the combined message with configured Spanish voice settings
detenerVoz()
Stops any currently playing speech.
Parameters: None
Example:
Voice Configuration
The hook uses carefully tuned voice parameters to create a distinctive robotic/analytical character:Voice Parameters
language-'es-MX'(Spanish - Mexico/Latin America)pitch-0.57- Higher pitch for a robotic/juvenile character tonerate-1.2- Slightly accelerated speed for analytical clarityvoice-'es-es-x-eea-network'- Specific Spanish voice engine
Integration with expo-speech
This hook wraps theexpo-speech library, which provides:
- Cross-platform TTS support (iOS and Android)
- Multiple language and voice options
- Configurable speech parameters (pitch, rate, language)
- Playback control (speak, stop)
Source Code
~/workspace/source/src/hooks/useDexterVoice.js
Best Practices
- Call
detenerVoz()before starting new speech to avoid overlapping audio - Clean text input to remove special characters that may affect pronunciation
- Consider adding speech callbacks for handling completion events
- Test voice parameters on both iOS and Android for consistent experience