If you get this error modules/speech_to_text/register_types.cpp:2:10: fatal error: ‘object_type_db.h’ file not found you need to do this :

Introduction – modules/speech_to_text/register_types.cpp:2:10: fatal error: ‘object_type_db.h’ file not found
Go into directory source of GODOT and modules/speech_to_text :
File to open is register_types.cpp
You will see use of a header file
#include "object_type_db.h"
It changes between GODOT 2 and 3 from object_type_db.h to class_db.h
So chang it by :
#include "core/object/class_db.h"
Save and execute GODOT source compilation again it will works.
I get similar error on
modules/speech_to_text/stt_config.h:4:10: fatal error: ‘core/resource.h’ file not found
You need to open modules/speech_to_text/stt_config.h and modify :
#include "core/resource.h"
By :
#include "core/io/resource.h"
Also i get modules/speech_to_text/stt_error.h:4:10: fatal error: ‘core/object.h’ file not found
so i do the following in stt_error.h :
#include "core/object.h" #include "core/ustring.h"
#include "core/object/object.h" #include "core/string/ustring.h"
Internal links :
https://docs.godotengine.org/en/3.0/development/compiling/compiling_for_osx.html